getting the authenticated username

Hi Forum.

I have developed a REST service (with Integration Server v9.7) which enables users to upload configuration files.
Because of documentation reasons i also want to persist the authenticated username of the user.

I did not find a standard service that returns that username (what does not mean that no standard service exists :stuck_out_tongue: ).

Does anyone of you know a standard service that retrieves the authenticated username?
Or does anyone know how to access that information in a custom java service?

Thanks in advance.

Martin

Have you tried “pub.flow:getTransportInfo” service.

This will have Authorization header which is a base64 encoded string of username and password.

Hi,

yes but this won´t help with Client Cert Auth :wink:

Kind regards,
Martin

Correct…!

You should be able to get the current user from IS Java API.

http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite9-10/Integration_Server/9-10_Integration_Server_Java_API_Reference/com/wm/app/b2b/server/Session.html
getUser() method…!

Thank you very much! I will try it out.

Kind regards,
Martin

Hello Martin,

Please try the getUser() in Service class.

http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite9-10/Integration_Server/9-10_Integration_Server_Java_API_Reference/com/wm/app/b2b/server/Service.html

I have just tried this it works fine.