How do I get current user from a restlet?

How do I get current user from a restlet?

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

0 votes

1 answers

4239 views

ANSWER



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.

0 votes