VMware {code} Community
satish123REUGHE
Contributor
Contributor

Remote Plugin fetch sessionId from UserSession.getKey()

In the remote plugin workflow, we are able to clone the session and get the UserSession Object, however looks like there is no way to get the sessionId making use of the session.

Please share if there is a way to get the session ID.

Reply
0 Kudos
1 Reply
Denis_Chorbadzh
VMware Employee
VMware Employee

Hi,

You should be able to use UserSession.getKey(). We are already using it in our remote plugin sample in order to check for some vCenter Server privileges. Please have a look at:

/samples/remote-plugin-sample/src/main/java/com/vmware/sample/remote/gateway/SessionServiceImpl.java

and

/samples/remote-plugin-sample/src/main/java/com/vmware/sample/remote/vim25/services/AuthorizationService.java

 

Best Regards,

Denis

Reply
0 Kudos