cancel
Showing results for 
Search instead for 
Did you mean: 

How to access the login userid from a WD application (auth. on the WAS)

Former Member
0 Kudos

Hi there,

Does anybody know how to access the user id authenticated on a WD application running on the WAS?

Note that I am not running the WD application on the portal but on the WAS.

Thank you,

Olivier.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

What do you mean running the WD application not on the portal but on the WAS? Is the "sap.authentication" property of the application set to true and you are running the stand-alone application? In that case:


try {
IUser u = WDClientUser.getCurrentUser().getSAPUser();
			
wdComponentAPI.getMessageManager().reportSuccess(u.getUid());
} catch (WDUMException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

Regards,

Satyajit.

Former Member
0 Kudos

Hello Satyajit,

By running WD application not in the portal I mean my WD application is running on a WAS04s alone. The SAP EP is not installed on this WAS.

I already tried the code you suggested but I did not get the logged user. When I test the isAnonymousUser() method, I always get false even if my WD application is configured for user authentification.

I went through the different postings on this forum but they are all related to the SAP EP. The code proposals do not work in my case...

Message was edited by: BvD-it Services

Message was edited by: BvD-it Services

Message was edited by: BvD-it Services

lajitha_menon
Contributor
0 Kudos

Hi,

So, what happens if you set the sap.authentication to true for the application and run the application? Does it show the page without going through any login screens?

Former Member
0 Kudos

Hello,

sap.authentication is set to true and I do get a login screen. My problem is to retrieve the logged user. When I test the code as proposed earlier in this thread I get some weird value that looks like a pointer value or an unitialized string value.