Package org.picketlink.identity.federation.core.wstrust.STSClientConfig

Examples of org.picketlink.identity.federation.core.wstrust.STSClientConfig.Builder.build()


        Builder builder = null;
        STSClient client = null;
        if (rawOptions.containsKey(STS_CONFIG_FILE)) {
            builder = new Builder(this.stsConfigurationFile);
            client = STSClientFactory.getInstance(maxClientsInPool).create(initialNumberOfClients, builder.build());
        } else {
            builder = new Builder();
            builder.endpointAddress((String) rawOptions.get(ENDPOINT_ADDRESS));
            builder.portName((String) rawOptions.get(PORT_NAME)).serviceName((String) rawOptions.get(SERVICE_NAME));
            builder.username((String) rawOptions.get(USERNAME_KEY)).password((String) rawOptions.get(PASSWORD_KEY));
View Full Code Here


                    builder.password(StringUtil.decode(passwordString, salt, iterationCount));
                } catch (Exception e) {
                    throw logger.unableToDecodePasswordError(passwordString);
                }
            }
            client = STSClientFactory.getInstance(maxClientsInPool).create(initialNumberOfClients, builder.build());
        }

        // if the login module options map still contains any properties, assume they are for configuring the connection
        // to the STS and set them in the Dispatch request context.
        if (!this.options.isEmpty()) {
View Full Code Here

            }

            if (passwordStacking)
                setPasswordStackingCredentials(builder);

            final STSClient stsClient = createWSTrustClient(builder.build());

            final Element token = invokeSTS(stsClient);

            if (token == null) {
                // Throw an exception as returing false only says that this login module should be ignored.
View Full Code Here

        assertAllProperties(config);
    }

    public void testBuildFromConfigPropertiesFile() {
        final Builder builder = new STSClientConfig.Builder("wstrust/sts-client.properties");
        assertAllProperties(builder.build());
    }

    public void testBuildFromConfigPropertiesFileOverridePassword() {
        final Builder builder = new STSClientConfig.Builder("wstrust/sts-client.properties");
        assertAllProperties(builder.build());
View Full Code Here

        assertAllProperties(builder.build());
    }

    public void testBuildFromConfigPropertiesFileOverridePassword() {
        final Builder builder = new STSClientConfig.Builder("wstrust/sts-client.properties");
        assertAllProperties(builder.build());

        final String overriddenPassword = "newPassword";
        builder.password(overriddenPassword);
        final STSClientConfig config = builder.build();
        assertEquals(overriddenPassword, config.getPassword());
View Full Code Here

        final Builder builder = new STSClientConfig.Builder("wstrust/sts-client.properties");
        assertAllProperties(builder.build());

        final String overriddenPassword = "newPassword";
        builder.password(overriddenPassword);
        final STSClientConfig config = builder.build();
        assertEquals(overriddenPassword, config.getPassword());
    }

    private void assertAllProperties(final STSClientConfig config) {
        assertEquals(serviceName, config.getServiceName());
View Full Code Here

        builder.serviceName(serviceName).portName(port).username(secInfo.username).password(secInfo.passwd);

        int index = 0;
        for (String endpointURI : endpointURIs) {
            builder.endpointAddress(endpointURI);
            this.clients[index++] = STSClientFactory.getInstance().create(builder.build());
        }

    }

    /**
 
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.