The "UsernameToken" class is only set on the message context when a certain property is set on the endpoint to stop WSS4J validating the UsernameToken. I think I will merge a fix to just set it on the context anyway. But it won't work with the current code. If you really want to, you can retrieve the list of security results + get the UsernameToken that way, see for example (method "doResults"):
svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java?view=markup Colm. On Wed, Sep 18, 2013 at 11:14 AM, Faz <[email protected]>wrote: > Thanks Coheigea, > I should have made myself clear before.Well, here is what am trying to do, > > AM trying to get the principal object which in this case gives me the > WSUsernameTokenPrincipal which is all good, but then I need to get the > usernametoken as mentioned below just to have the validation check as I > procured the below code for creating auth interceptors. > > > > The usernametoken above always comes as null. If you have any suggestions > on > this validation check, I can give that a try. Thnx again! > > > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/UserNameToken-is-Null-tp5734200p5734203.html > Sent from the cxf-user mailing list archive at Nabble.com. > -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com
