cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get current user from a restlet?

jana01_
Champ on-the-rise
Champ on-the-rise

How do I get current user from a restlet?

I don't want to use Seam for my restlet.

1 ACCEPTED ANSWER

Laurent_Doguin
Star Collaborator
Star Collaborator

Hi,

you can get the principal from the HttpServletRequest object using HttpServletRequest#getUserPrincipal() .

Note that Restlet is not what Nuxeo recommends for REST APIs. We prefer Content Automation or JAX-RS/WebEngine.

View answer in original post

1 REPLY 1

Laurent_Doguin
Star Collaborator
Star Collaborator

Hi,

you can get the principal from the HttpServletRequest object using HttpServletRequest#getUserPrincipal() .

Note that Restlet is not what Nuxeo recommends for REST APIs. We prefer Content Automation or JAX-RS/WebEngine.