[jboss-user] [JBoss Web Services] - Re: How to get the principal on a webservice behind JAAS?

sjahan do-not-reply at jboss.com
Mon Oct 10 04:10:46 EDT 2011


sjahan [http://community.jboss.org/people/sjahan] created the discussion

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

To view the discussion, visit: http://community.jboss.org/message/630821#630821

--------------------------------------------------------------
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
[http://community.jboss.org/message/630821#630821]

Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111010/d41aa63e/attachment.html 


More information about the jboss-user mailing list