Examples of SAML2HandlerChainConfig


Examples of org.picketlink.identity.federation.core.saml.v2.interfaces.SAML2HandlerChainConfig

            Map<String, Object> chainConfigOptions = new HashMap<String, Object>();
            chainConfigOptions.put(GeneralConstants.ROLE_GENERATOR, roleGenerator);
            chainConfigOptions.put(GeneralConstants.CONFIGURATION, idpConfiguration);

            SAML2HandlerChainConfig handlerChainConfig = new DefaultSAML2HandlerChainConfig(chainConfigOptions);
            Set<SAML2Handler> samlHandlers = chain.handlers();

            for (SAML2Handler handler : samlHandlers) {
                handler.initChainConfig(handlerChainConfig);
            }
View Full Code Here

Examples of org.picketlink.identity.federation.core.saml.v2.interfaces.SAML2HandlerChainConfig

    @SuppressWarnings("unchecked")
    @Test
    public void testAttributes() throws Exception {
        SAML2AttributeHandler handler = new SAML2AttributeHandler();

        SAML2HandlerChainConfig chainConfig = new DefaultSAML2HandlerChainConfig();
        SAML2HandlerConfig handlerConfig = new DefaultSAML2HandlerConfig();

        Map<String, Object> chainOptions = new HashMap<String, Object>();
        IDPType idpType = new IDPType();
        idpType.setAttributeManager(TestAttributeManager.class.getName());
        chainOptions.put(GeneralConstants.CONFIGURATION, idpType);
        chainConfig.set(chainOptions);
       
        // Initialize the handler
        handler.initChainConfig(chainConfig);
        handler.initHandlerConfig(handlerConfig);
View Full Code Here

Examples of org.picketlink.identity.federation.core.saml.v2.interfaces.SAML2HandlerChainConfig

    @SuppressWarnings("unchecked")
    @Test
    public void testAttribsOnSP() throws Exception {
        SAML2AttributeHandler handler = new SAML2AttributeHandler();

        SAML2HandlerChainConfig chainConfig = new DefaultSAML2HandlerChainConfig();
        SAML2HandlerConfig handlerConfig = new DefaultSAML2HandlerConfig();

        Map<String, Object> chainOptions = new HashMap<String, Object>();
        ProviderType spType = new SPType();
        chainOptions.put(GeneralConstants.CONFIGURATION, spType);
        chainConfig.set(chainOptions);

        // Initialize the handler
        handler.initChainConfig(chainConfig);
        handler.initHandlerConfig(handlerConfig);
View Full Code Here

Examples of org.picketlink.identity.federation.core.saml.v2.interfaces.SAML2HandlerChainConfig

        TrustType trustType = new TrustType();
        Map<String, Object> chainOptionsIdp = new HashMap<String, Object>();
        IDPType idpType = new IDPType();
        idpType.setTrust(trustType);
        chainOptionsIdp.put(GeneralConstants.CONFIGURATION, idpType);
        SAML2HandlerChainConfig chainConfigIdp = new DefaultSAML2HandlerChainConfig(chainOptionsIdp);
        issuerTrustHandler.initChainConfig(chainConfigIdp);

        // Create documentHolder
        NameIDType issuer = new NameIDType();
        AuthnRequestType authnRequestType = new AuthnRequestType("ID_123456789", null);
View Full Code Here

Examples of org.picketlink.identity.federation.core.saml.v2.interfaces.SAML2HandlerChainConfig

        return null;
    }

    protected void initializeHandlerChain() throws ConfigurationException, ProcessingException {
        populateChainConfig();
        SAML2HandlerChainConfig handlerChainConfig = new DefaultSAML2HandlerChainConfig(chainConfigOptions);

        Set<SAML2Handler> samlHandlers = chain.handlers();

        for (SAML2Handler handler : samlHandlers) {
            handler.initChainConfig(handlerChainConfig);
View Full Code Here

Examples of org.picketlink.identity.federation.core.saml.v2.interfaces.SAML2HandlerChainConfig

        // Create handlers
        SAML2AuthenticationHandler authenticationHandler = new SAML2AuthenticationHandler();
        SAML2InResponseToVerificationHandler verificationHandler = new SAML2InResponseToVerificationHandler();

        // Create configuration for handlers
        SAML2HandlerChainConfig chainConfig = new DefaultSAML2HandlerChainConfig();
        SAML2HandlerConfig handlerConfig = new DefaultSAML2HandlerConfig();
        handlerConfig.addParameter(GeneralConstants.NAMEID_FORMAT, JBossSAMLURIConstants.NAMEID_FORMAT_PERSISTENT.get());
        handlerConfig.addParameter(SAML2Handler.DISABLE_SENDING_ROLES, "true");

        Map<String, Object> chainOptions = new HashMap<String, Object>();
        ProviderType spType = new SPType();
        chainOptions.put(GeneralConstants.CONFIGURATION, spType);
        chainOptions.put(GeneralConstants.ROLE_VALIDATOR_IGNORE, "true");
        chainConfig.set(chainOptions);

        // Initialize the handlers
        authenticationHandler.initChainConfig(chainConfig);
        authenticationHandler.initHandlerConfig(handlerConfig);
        verificationHandler.initChainConfig(chainConfig);
View Full Code Here

Examples of org.picketlink.identity.federation.core.saml.v2.interfaces.SAML2HandlerChainConfig

        // Create chainConfig for IDP
        Map<String, Object> chainOptionsIdp = new HashMap<String, Object>();
        IDPType idpType = new IDPType();
        chainOptionsIdp.put(GeneralConstants.CONFIGURATION, idpType);
        chainOptionsIdp.put(GeneralConstants.ROLE_VALIDATOR_IGNORE, "true");
        SAML2HandlerChainConfig chainConfigIdp = new DefaultSAML2HandlerChainConfig(chainOptionsIdp);

        // Create and init handlers for IDP
        SAML2AuthenticationHandler authenticationHandlerIdp = new SAML2AuthenticationHandler();
        SAML2InResponseToVerificationHandler verificationHandlerIdp = new SAML2InResponseToVerificationHandler();
        authenticationHandlerIdp.initChainConfig(chainConfigIdp);
View Full Code Here

Examples of org.picketlink.identity.federation.core.saml.v2.interfaces.SAML2HandlerChainConfig

        KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
        KeyPair keypair = kpg.genKeyPair();

        SAML2SignatureGenerationHandler handler = new SAML2SignatureGenerationHandler();

        SAML2HandlerChainConfig chainConfig = new DefaultSAML2HandlerChainConfig();
        SAML2HandlerConfig handlerConfig = new DefaultSAML2HandlerConfig();

        Map<String, Object> chainOptions = new HashMap<String, Object>();
        SPType idpType = new SPType();
        chainOptions.put(GeneralConstants.CONFIGURATION, idpType);
        chainOptions.put(GeneralConstants.KEYPAIR, keypair);
        chainConfig.set(chainOptions);

        // Initialize the handler
        handler.initChainConfig(chainConfig);
        handler.initHandlerConfig(handlerConfig);
View Full Code Here

Examples of org.picketlink.identity.federation.core.saml.v2.interfaces.SAML2HandlerChainConfig

public class SAML2AuthenticationHandlerUnitTestCase {
    @Test
    public void handleNameIDCustomization() throws Exception {
        SAML2AuthenticationHandler handler = new SAML2AuthenticationHandler();

        SAML2HandlerChainConfig chainConfig = new DefaultSAML2HandlerChainConfig();
        SAML2HandlerConfig handlerConfig = new DefaultSAML2HandlerConfig();
        handlerConfig.addParameter(GeneralConstants.NAMEID_FORMAT, JBossSAMLURIConstants.NAMEID_FORMAT_PERSISTENT.get());

        Map<String, Object> chainOptions = new HashMap<String, Object>();
        ProviderType spType = new SPType();
        chainOptions.put(GeneralConstants.CONFIGURATION, spType);
        chainOptions.put(GeneralConstants.ROLE_VALIDATOR_IGNORE, "true");
        chainConfig.set(chainOptions);

        // Initialize the handler
        handler.initChainConfig(chainConfig);
        handler.initHandlerConfig(handlerConfig);
View Full Code Here

Examples of org.picketlink.identity.federation.core.saml.v2.interfaces.SAML2HandlerChainConfig

    @Ignore
    @Test
    public void handleEncryptedAssertion() throws Exception {
        SAML2AuthenticationHandler handler = new SAML2AuthenticationHandler();

        SAML2HandlerChainConfig chainConfig = new DefaultSAML2HandlerChainConfig();
        SAML2HandlerConfig handlerConfig = new DefaultSAML2HandlerConfig();

        Map<String, Object> chainOptions = new HashMap<String, Object>();
        ProviderType spType = new SPType();
        chainOptions.put(GeneralConstants.CONFIGURATION, spType);
        chainOptions.put(GeneralConstants.ROLE_VALIDATOR_IGNORE, "true");
        chainConfig.set(chainOptions);

        // Initialize the handler
        handler.initChainConfig(chainConfig);
        handler.initHandlerConfig(handlerConfig);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.