Search in sources :

Example 1 with UsernameTokenType

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()));
    }
}
Also used : UsernameTokenType(org.apache.wss4j.policy.model.UsernameToken.UsernameTokenType) QName(javax.xml.namespace.QName) PasswordType(org.apache.wss4j.policy.model.UsernameToken.PasswordType)

Aggregations

QName (javax.xml.namespace.QName)1 PasswordType (org.apache.wss4j.policy.model.UsernameToken.PasswordType)1 UsernameTokenType (org.apache.wss4j.policy.model.UsernameToken.UsernameTokenType)1