use of org.apache.wss4j.policy.model.UsernameToken.UsernameTokenType in project cxf by apache.
the class UsernameTokenPolicyValidator method assertToken.
private void assertToken(org.apache.wss4j.policy.model.UsernameToken token, AssertionInfoMap aim) {
String namespace = token.getName().getNamespaceURI();
if (token.isCreated()) {
PolicyUtils.assertPolicy(aim, SP13Constants.CREATED);
}
if (token.isNonce()) {
PolicyUtils.assertPolicy(aim, SP13Constants.NONCE);
}
PasswordType passwordType = token.getPasswordType();
if (passwordType != null) {
PolicyUtils.assertPolicy(aim, new QName(namespace, passwordType.name()));
}
UsernameTokenType usernameTokenType = token.getUsernameTokenType();
if (usernameTokenType != null) {
PolicyUtils.assertPolicy(aim, new QName(namespace, usernameTokenType.name()));
}
}
Aggregations