How to get logged-in user/group information in WebLogic Portal 10.3.2

Hi bros.
I have a codesnipet to get information about user who actually logged in weblogic portal:
import javax.security.auth.Subject;
import javax.security.auth.login.LoginException;
import com.bea.p13n.security.Authentication;
import com.bea.portal.tools.security.user.*;
public class UGMSummary {
     private static final String username = "weblogic";
     private static final String password = "webl0gic";
     public UGMSummary(){
     public void test(){
          try {
               Subject tmp = Authentication.authenticate(username, password);
               //PolicyItem pi = new PolicyItem();
               //System.out.println("######## " + Authentication.getCurrentSubject().toString());
               UserIDBuilder builder = new UserIDBuilder();
               UserID uid = builder.createResourceID();
               System.out.println("######## Admin ? " + Authentication.isAdministrator(tmp));
               System.out.println("######## Anonymous ? " + Authentication.isAnonymous(tmp));
               System.out.println(" ######## " + uid.getUserName());
          } catch (LoginException e) {
               System.out.println(e.getMessage());
               //e.printStackTrace();
}Some println commands above are used to mark in console. I can ensure that there is an user (admin) logged in weblogic system by executing command: Authentication.isAdministrator(tmp);
Output of codesnipet above is:
######## Admin ? true
######## Anonymous ? false
######## nullMy problem is impossible to use UserID object to get username of weblogic user. Output of command: uid.getUsername() is: null
Somebody tell me why my code doesn't work though it can authenticate an user.
Thank in advance.
ps:
Some Javadoc for UserID can be found here:
http://download.oracle.com/docs/cd/E15919_01/wlp.1032/e14255/index.html
http://download.oracle.com/docs/cd/E15919_01/wlp.1032/e14255/index.html

Hi, Kevin.
I'm glad to see your response again. I found some interesting information from your recommendation link. At this time, I know that impossible to get users/groups information by using DelegatedAtnProxyManagerControlFacade (ref: http://download.oracle.com/docs/cd/E15919_01/wlp.1032/e14255/com/bea/portal/tools/ugm/controls/DelegatedAtnProxyManagerControlFacade.html) interface.
But, I dont know how to get an instance of an object that implemented this interface. My friend give me a codesnipet that shown the way to get a DelegatedAtnProxyManagerControlFacade by using this codesnipet in a GlobalController:
      try
        DelegatedAtnProxyManagerControlFacade delegatedAtnProxyManager = (DelegatedAtnProxyManagerControlFacade)getControl(DelegatedAtnProxyManagerControlFacade.class);
      catch (PolicyRefException e)
        reportPolicyRefException(e);
      catch (OperationNotSupportedException e)
        reportOperationNotSupportedException(e);
      }But I dont know what global.GlobalController actually is ?
I've asked Google for information but I got nothing. Do you know any documentation that describes about this controller ?
Thanks, regards !
Doubt_Man.

Similar Messages

  • How to get logged in user name from windows service c#

    i use the below code to get logged in user name.
    private string GetLoggedInUser()
    string userName = "";
    if (System.Security.Principal.WindowsIdentity.GetCurrent() != null)
    userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
    return userName;
    just do not understand why it is not giving a logged in user name rather it is return data in this format
    NT AUTHORITY\SYSTEM but i want to get user name.
    i try to run my service as Local Service and local system account but in every case i am getting this string
    NT AUTHORITY\SYSTEM instead of logged in user name.
    so please guide me what to change in code. thanks

    System is the account the service is running under.
    There can be none or many interactive users be logged in. What if none or multiple are logged in? Which one are you referring to then?
    Armin

  • How to get Logged-in user detail from solution Manager.

    Hi to all,
             How can i get details of a user who is logged in into SAP Solution Manager through my webDynpro application. I need to read some values from SAP Solution Manager. How could i do it?? Shall i need to call RFCs??
    If anybody have idea please reply.
    If anybody has some code please send it.
    Points will be rewarded.
    Thanks in advance.

    Pankaj,
    Here is the code to get the logged in user in Web Dynpro.
         //Get the current logged user information
         IWDClientUser user = WDClientUser.getLoggedInClientUser();
         IUser usr = user.getSAPUser();
    String userId = usr.getUniqueName();
    Regards,
    Anand

  • How to get  log of user's delete action on Content Items?

    Hi all,
    When one user edit a Content Item, we can get the log about this action. But when user delete this content Item, I couldn't find out the log about this action.
    I wonder that WebCenter Content have any function to logging the delete action on Content Items?
    If it have, where I can find it ?
    Thanks a lot!

    If you are strictly interested in just "deletes", you can query the table "DocumentHistory". Basic data like checkin, checkout, update, and delete actions against a document is recorded there, along with the user and date.
    If you need deeper data however, as Srinath noted, Content Tracker is built for those deeper requests.

  • How to get List of SharePoint Groups to which Current Users belongs using Javascript ?

    How to get List of SharePoint Groups to which Current Users belongs using JavaScript? Not JSOM

    Here is the code that worked for me:
    var userid= _spPageContextInfo.userId;
      var requestUri = _spPageContextInfo.webAbsoluteUrl + '/_api/web/CurrentUser/Groups?$select=Id,Title';
    alert(requestUri);
      var requestHeaders = { "accept" : "application/json;odata=verbose" };
      $.ajax({
        url : requestUri,
        contentType : "application/json;odata=verbose",
        headers : requestHeaders,
        success : onSuccess,
        error : onError
      function onSuccess(data, request){
    var s='';
     for (var i = 0; i < data.d.results.length; i++)
    s +=data.d.results[i].Title+'\n';
        alert(s);
      function onError(error) {
        alert("error");

  • How to get the Current User on the UI page?

    All,
    Could you please let me know how to get the Current user on the UI input page , i need to display the current user ID when some one clicks the submit button, i want o get the current user to display in the javascript alert box.
    Edited by: 951930 on Oct 24, 2012 12:21 PM

    lucky,
    my schema has already defined for
    <user mapField="USER_ID" default="%CurrentUser"/>
    and in my UI page
    <td oraLabel="user"></td><td oraField="user" id="userId" ></td>
    and my javascript
    function showUserId () {                        
    var curUser = document.getElementById('userId').value;
    alert(curUser);
    and i have called this function on my submit button, but i am not able to get Current Logged User ID value to show in the alert nor able to show the current logged user on the UI page.
    my requirement is on custom UI page i need to show Current Logged User in one corner of the page and also need to show the same user in alert when he submits the button.
    Appreciate for the help.
    Edited by: 951930 on Oct 25, 2012 8:42 AM
    Edited by: 951930 on Oct 25, 2012 9:06 AM

  • How to get the current user logon to portal?

    Hi Gurus,
    How to get the current user who logged into portal.
    I have a webdynpro requirement where in which I have to get the current user id who loggedinto portal which will be the input parameter of the BAPI(adaptive RFC model) which will return me employee number of the particular user.
    Can anyone send me the code to retrive the user id through webdynpro application..........
    Pts will be rewarded for useful inputs......
    Thanks in Advance,
    Dharani

    Hi Dharani,
    Using UMEfactory u can do that...
    1. create one input field,
    2. create one attribute called Uid
    3. assign Uid attribute to the input field
    4. type the following code in Doinit() method
                String uid = wdContext.currentContextElement().getUid();
         try {
         IUser user = UMFactory.getUserFactory().
         getUserByLogonID(uid);
         String userName = user.getDisplayName();
         } catch (UMException ex) {
          e.toString(); 
    5. after that go to Portal create one iview assign to particular user. then u get into the user details...
    thats it
    Regards,
    P.Manivannan

  • Getting Logged in user roles

    Hi EveryOne,
    We are developing repository filter.  Here we need to check roles of loged in user. How can we get role names  in repository filter application?.
    Thanks in advance,
    Venkatesh.R

    Hi Venkatesh
    You can refer to your doubts in through the folowiing PDF
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3641e490-0201-0010-c68f-e51221925714
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2b/306bb5bc98f24f8a85d489449af456/frameset.htm--
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/library/ep/_s-u/Using%20The%20New%20User%20Management%20API%20in%20EP%206.0
    For getting Logged on user details
    String presentuser=null;
                   IWDClientUser wdUser = WDClientUser.getCurrentUser();
                   IUser user = wdUser.getSAPUser();
                   presentuser=user.getUniqueID()
    you will have to get com.sap.security.api.jar
    (Path C:\Program Files\SAP\IDE\IDE70\eclipse\plugins\com.sap.security_2.0.0\lib\com.sap.security.api.jar.  //// the path is the installed directory of NWDS )
    Thanx
    Pankaj

  • How to get the remote user IP address if behind the proxy or firewall

    Hi
    How do i get the remote user Ip address who is invoking the servlet behind from a firewall.
    When i use getRemoteHostAddr it gives the proxy ip address not the actuall user host address... Kindly let me know how to get the actual user ip address
    satish

    There is no reliable way to determine the original IP, and such information is not useful to you if the original IP is behind a firewall. What do you propose to use it for? There is probably an alternative way to do things that does not require the remote IP.

  • How to find out the account group information in customer master record?

    how to find out the account group information in customer master record?
    in which tab? thanks in advance

    Hi
    Go to XD02 and select the Extras from the main menu , you will find Account group info -> click on the No.ranges.
    reward if it helps
    SR

  • How to get the NT user id and passwd

    Hi,
    How to get the NT user id and passwd using form 6i

    You cannot get the password. Password are stored in an encrypted format. Almost never decrypted (as a security meassure). Authentication is performed by encrypting the supplied password and matching that against the stored encrypted password.
    Think about it.. just how dangerous it will be to have a function that can dump NT users and their passwords for you. How can you ever expect to "simply decrypt a password"?
    As for getting the user name. See the Win32 kernel API call GetCurrentUser(). Also note that there is a big difference as to the owner/user of a server process/thread versus the end-user of client application (possibly running on another PC) that is making the call to the server.
    Of course, none of this is related to SQL or PL/SQL - which is what I believe the subject matter of this forum is... Kindly suggest that in future you pay attention to posting the correct subject material to the correct forum.

  • How to get the logon user id?

    hi experts
    how to get the logon user id?
    thanks a lot.

    hi ,
    get the data for the user from db tables usr02  usr41..
    regards,
    venkat.

  • How to get window system user?

    Hi,
    How to get window system user use PL/SQL(form develope6i)?

    If you don't use Oracle database then you will have to do one of two things:
    (1) Now I'm back in the office I can check D2KWUTIL. The version I have comes with Forms6.0, so it is somewhat out of date, but it has a method called WIN_API_ENVIRONMENT.Get_Windows_Username - which works for NT/95 only, although I'm sure a later version will support more recent OS.
    (2) If that's no good then you'll have to use whatever facilities your database offers: I only know Oracle.
    I also repeat my suggestion that you try the Forms forum for additional help. This is the Database forum and so is focused on serverside Oracle PL/SQL. For your needs the Developer Suite forums are better.
    Cheers, APC

  • How to get list of users who reset password using FIM portal

    How to get list of users who reset password using FIM portal
    -Thanks Rakesh Sawant

    Hi Rakesh,
    I think you are looking for something like this:
    Using Powershell to list all users that had completed
    a password reset within the last 30 days
    If you found my post helpful, please give it a Helpful vote. If it answered your question, remember to mark it as an Answer.

  • How to configure to use Strut 1.2 in weblogic portal 10.3.2

    I am new in weblogic portal, now i need to develop Strut portlet version 1.2. But I don't know how to configure it in weblogic 10.3.2 and i can't find document for how to configure Strut 1.2 to work on weblogic portal 10.3.2. I added relation libraries and configure like in weblogic document of oracle. But it's can not run and throw some exceptions like : can not render jsp file. Someone can tell me how to configure Strut 1.2 to develop Strut portlet ? Thanks in advance!

    This would be a good place to start:
    http://download.oracle.com/docs/cd/E15919_01/wlp.1032/e14243/integrate.htm#BABBEHCH
    Brad

Maybe you are looking for