Hi,

You can look into JAASLoginInterceptor invoking on UNMARSHAL phase and doing 
the following in handleMessage():

        AuthorizationPolicy policy = message.get(AuthorizationPolicy.class);
        if (policy != null) {
            name = policy.getUserName();
            password = policy.getPassword();
        } else {
            // try the UsernameToken
            SecurityToken token = message.get(SecurityToken.class);
            if (token != null && token.getTokenType() == 
TokenType.UsernameToken) {
                UsernameToken ut = (UsernameToken)token;
                name = ut.getName();
                password = ut.getPassword();
            }
        }
        ...

Regards,
Andrei.


> -----Original Message-----
> From: Paul Avijit [mailto:[email protected]]
> Sent: Mittwoch, 7. Mai 2014 04:12
> To: [email protected]
> Subject: WS-Security + UsernameToken - Custom Authentication/Authorization
> 
> Hi,
> 
> How can I do Custom Authentication/Authorization using WS-Security with
> UsernameToken (without using passwordCallback). Is there a sample code I can
> refer.
> 
> Thanks in advance.
> 
> Regards
> Paul

Reply via email to