Package org.opensaml.ws.security.provider

Examples of org.opensaml.ws.security.provider.BasicSecurityPolicy


    public void receiveMessage(final SAMLMessageContext context, final SignatureTrustEngine engine) {

        context.setPeerEntityRole(IDPSSODescriptor.DEFAULT_ELEMENT_NAME);
        context.setInboundSAMLProtocol(SAMLConstants.SAML20P_NS);

        SecurityPolicy policy = new BasicSecurityPolicy();
        policy.getPolicyRules().add(new SAML2HTTPPostSimpleSignRule(engine, parserPool, engine.getKeyInfoResolver()));
        policy.getPolicyRules().add(new SAMLProtocolMessageXMLSignatureSecurityPolicyRule(engine));
        StaticSecurityPolicyResolver resolver = new StaticSecurityPolicyResolver(policy);
        context.setSecurityPolicyResolver(resolver);

        try {
            decoder.decode(context);
View Full Code Here


     * @param samlContext saml context to set the policy to
     * @param binding     binding used to retrieve the message
     */
    protected void populateSecurityPolicy(SAMLMessageContext samlContext, SAMLBinding binding) {

        SecurityPolicy policy = new BasicSecurityPolicy();
        binding.getSecurityPolicy(policy.getPolicyRules(), samlContext);
        StaticSecurityPolicyResolver resolver = new StaticSecurityPolicyResolver(policy);
        samlContext.setSecurityPolicyResolver(resolver);

    }
View Full Code Here

TOP

Related Classes of org.opensaml.ws.security.provider.BasicSecurityPolicy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.