Although it is disabled by default, there is a web service that returns all of the details for the currently logged in user.
You can invoked the User web service by adding this parameter to
The User web service can then be accessed via GET request at
/twigkit/api/user for example:
See also How to Import Security Certificates.