cancel
Showing results for 
Search instead for 
Did you mean: 

How do you get a username?

former_member273222
Participant
0 Kudos

We have a Java app running on Web AS Java 7. Right now Authentication is handled by a login stack so by the time a user gets to the app they have already been authenticated. So how can our application see their username?

Right now we use sapsecu.dll to extract their username from their SAP Logon Ticket. Is there a way to get their username with pure java (no external dlls)?

Accepted Solutions (1)

Accepted Solutions (1)

former_member182294
Active Contributor
0 Kudos

If you are trying to get the user from a Servlet you can use

IUser user = UMFactory.getAuthenticator().getLoggedInUser(httprequest,httpresponse);

other wise

IUser user = UMFactory.getAuthenticator().getLoggedInUser();

String userName = user.getFirstName() + " " + user.getLastName();

You can use various methods available to get other user details.

Regards

Abhilash

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos