JBoss Community

Re: How to get the principal on a webservice behind JAAS?

created by sjahan in JBoss Web Services - View the full discussion

Finally figured out, it's quite simple but i got to look for it with good keywords.

 

For those who could wonder about the answer, you just declare a variable WebServiceContext in your POJO, with a @Resource annotation.

Example:

 

@Resource

public WebServiceContext wsCtx;

 

...

 

Later:

 

wsCtx.getUserPrincipal();

 

Hoping this could help someone later ;)

Have a nice day.

 

SJ.

Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community