Quantcast
Channel: SCN : All Content - SAP NetWeaver Application Server
Viewing all articles
Browse latest Browse all 2997

Impersonate user for the UME

$
0
0

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


Viewing all articles
Browse latest Browse all 2997

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>