Search in sources :

Example 1 with Trust10

use of org.apache.wss4j.policy.model.Trust10 in project cxf by apache.

the class AbstractCommonBindingHandler method assertTrustProperties.

protected void assertTrustProperties(String namespace) {
    AssertionInfoMap aim = message.get(AssertionInfoMap.class);
    Collection<AssertionInfo> trust10Ais = aim.get(new QName(namespace, SPConstants.TRUST_10));
    if (trust10Ais != null) {
        for (AssertionInfo ai : trust10Ais) {
            ai.setAsserted(true);
            Trust10 trust10 = (Trust10) ai.getAssertion();
            assertTrust10Properties(trust10);
        }
    }
    Collection<AssertionInfo> trust13Ais = aim.get(new QName(namespace, SPConstants.TRUST_13));
    if (trust13Ais != null) {
        for (AssertionInfo ai : trust13Ais) {
            ai.setAsserted(true);
            Trust13 trust13 = (Trust13) ai.getAssertion();
            assertTrust10Properties(trust13);
            if (trust13.isRequireRequestSecurityTokenCollection()) {
                assertPolicy(new QName(namespace, SPConstants.REQUIRE_REQUEST_SECURITY_TOKEN_COLLECTION));
            }
            if (trust13.isRequireAppliesTo()) {
                assertPolicy(new QName(namespace, SPConstants.REQUIRE_APPLIES_TO));
            }
            if (trust13.isScopePolicy15()) {
                assertPolicy(new QName(namespace, SPConstants.SCOPE_POLICY_15));
            }
            if (trust13.isMustSupportInteractiveChallenge()) {
                assertPolicy(new QName(namespace, SPConstants.MUST_SUPPORT_INTERACTIVE_CHALLENGE));
            }
        }
    }
}
Also used : Trust13(org.apache.wss4j.policy.model.Trust13) AssertionInfo(org.apache.cxf.ws.policy.AssertionInfo) QName(javax.xml.namespace.QName) Trust10(org.apache.wss4j.policy.model.Trust10) AssertionInfoMap(org.apache.cxf.ws.policy.AssertionInfoMap)

Aggregations

QName (javax.xml.namespace.QName)1 AssertionInfo (org.apache.cxf.ws.policy.AssertionInfo)1 AssertionInfoMap (org.apache.cxf.ws.policy.AssertionInfoMap)1 Trust10 (org.apache.wss4j.policy.model.Trust10)1 Trust13 (org.apache.wss4j.policy.model.Trust13)1