Skip to Content
avatar image
Former Member

How to access user data of SSO user ?

Dear WebDynpro-experts,

for checking access rights of the user of my WebDynpro java project which is buildt into a portal

I need to check the data, especially the user-name of the user working with my application.

I don't have any idea how to access data provided by the SSO (Single Sign On) mechanism in my

WebDynpro Java application.

Coudl you give me a hint ?

Best regards,

Daniel

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Jan 23, 2009 at 03:09 PM

    HI,

    try

    {IWDClientUser wdUser = WDClientUser.getCurrentUser();

    IUser user = wdUser.getSAPUser();

    if (user != null)

    {

    IUserAccount[] acct = user.getUserAccounts();

    if(acct[0] != null)

    {

    String strUserid = acct[0].getLogonUid();

    wdContext.current<node name>().set<attribute name>(new String(strUserid));

    }

    }

    }

    Regards,

    Murtuza

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      1. Right click on your project and select properties-->Java Build Path

      2. Select Variables tab

      3. Click on extend

      4. Select com.sap.security.api.jar or com.sap.security.api2.0.jar

      5. Click OK

      6. Rebuild your project and you are through.

      Regards,

      Murtuza