on 03-24-2015 7:40 PM
Dear Experts,
I am looking for a way to access the userid from a SAP Logon Ticket in a Java web application deployed on Netweaver AS Java server. How can I extract the userid from the SAP Logon Ticket cookie using Java or Javascript?
Thanks,
Hi Bradley,
I'd suggest you enable authentication for your app and use the IUser interface.
This also allows you to access other data for the logged in user and will work independant, whether he logged in using Logon Tickets, SAML, X.509 or or other methods.
Regards,
Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bradley,
please check this presentation in the user management functions of the SAP J2EE engine.
You will need to include the UME library (com.sap.security.api.sda)
You use the functions provided by the UMFactory
There are two available functions:
Use getLoggedInUser() to get an already logged on user‘s ID.
If the user is not yet logged on, use forceLoggedInUser() to show the logon screen.
IUser user =
UMFactory.getAuthenticator().getLoggedInUser(request, response);
if (null == user) {
UMFactory.getAuthenticator().forceLoggedInUser(request, response);
return;
}
For WebDynpro, you can find an example here.
For a portal environment, you can find some info in the presentation mentioned above.
Kind regards,
Patrick
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.