Skip to Content
0
Former Member
Apr 28, 2014 at 07:48 AM

Impersonate user for the UME

60 Views

Hi all,

I have a requirement to change the user I recieve if calling the method UMFactory.getAuthenticator().getLoggedInUser() ar runtime in my servlet deployed to SAP NW AS Java. I know it sounds weird, but please trust me, that I need it really (i.e. bad design etc. are already taken in account) ��.

I.e. I need following: I have a servlet, which will be called in the context of user A. Then I have to do some work, let's say: Method X -> Method Y -> Method Z

What I want to do is to call the method Y in the context of the User B (= UMFactory.getAutneticator().getLoggedInUser() == User B). Is there a possibility to do this?

One approach is only come to my mind is to transfer the code of method Y in a separate servlet and call it from my original servlet with other authentication information....But this approach is as weird as the question itself (performance etc.) ��.

Do anybody knows the better approach?

Thank you in advance and best regards,

Artem