use of org.apache.cxf.interceptor.security.NameDigestPasswordCallbackHandler in project cxf by apache.
the class CallbackHandlerProviderUsernameToken method create.
@Override
public CallbackHandler create(Message message) {
SecurityToken token = message.get(SecurityToken.class);
if (!(token instanceof UsernameToken)) {
return null;
}
UsernameToken ut = (UsernameToken) token;
if (ut.getPasswordType().endsWith("PasswordDigest")) {
return new NameDigestPasswordCallbackHandler(ut.getName(), ut.getPassword(), ut.getNonce(), ut.getCreatedTime());
}
return new NamePasswordCallbackHandler(ut.getName(), ut.getPassword());
}
Aggregations