STSClientConfig config = builder.build(); STSClientPool pool = STSClientPoolFactory.getPoolInstance();
public WSTrustClient(String serviceName, String port, String[] endpointURIs, SecurityInfo secInfo) throws ParsingException { // basic input validation. if (serviceName == null || port == null || endpointURIs == null || secInfo == null) throw new IllegalArgumentException(ErrorCodes.NULL_ARGUMENT + "The service name, port, endpoint URIs and security info parameters cannot be null"); if (endpointURIs.length == 0) throw new IllegalArgumentException(ErrorCodes.NULL_ARGUMENT + "At least one endpoint URI must be provided"); // create an STSClient for each endpointURI. this.clients = new STSClient[endpointURIs.length]; Builder builder = new STSClientConfig.Builder(); 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()); } }
setPasswordStackingCredentials(builder); final STSClient stsClient = createWSTrustClient(builder.build());
setPasswordStackingCredentials(builder); final STSClient stsClient = createWSTrustClient(builder.build());
setPasswordStackingCredentials(builder); STSClientConfig stsClientConfig = builder.build(); stsClient = createWSTrustClient(stsClientConfig);
setPasswordStackingCredentials(builder); STSClientConfig stsClientConfig = builder.build(); stsClient = createWSTrustClient(stsClientConfig);
STSClientConfig stsClientConfig = configBuilder.build(); stsClient = createSTSClient(stsClientConfig);
STSClientConfig stsClientConfig = configBuilder.build(); stsClient = createSTSClient(stsClientConfig);
setPasswordStackingCredentials(builder); final STSClient stsClient = createWSTrustClient(builder.build());
public WSTrustClient(String serviceName, String port, String[] endpointURIs, SecurityInfo secInfo) throws ParsingException { // basic input validation. if (serviceName == null || port == null || endpointURIs == null || secInfo == null) throw logger.nullArgumentError("The service name, port, endpoint URIs and security info parameters cannot be null"); if (endpointURIs.length == 0) throw logger.nullArgumentError("At least one endpoint URI must be provided"); // create an STSClient for each endpointURI. this.clients = new STSClient[endpointURIs.length]; Builder builder = new STSClientConfig.Builder(); builder.serviceName(serviceName).portName(port).username(secInfo.username).password(secInfo.passwd); STSClientPool pool = STSClientFactory.getInstance(); int index = 0; for (String endpointURI : endpointURIs) { builder.endpointAddress(endpointURI); STSClientConfig config = builder.build(); pool.createPool(config); this.clients[index++] = pool.getClient(config); } }
public WSTrustClient(String serviceName, String port, String[] endpointURIs, SecurityInfo secInfo) throws ParsingException { // basic input validation. if (serviceName == null || port == null || endpointURIs == null || secInfo == null) throw logger.nullArgumentError("The service name, port, endpoint URIs and security info parameters cannot be null"); if (endpointURIs.length == 0) throw logger.nullArgumentError("At least one endpoint URI must be provided"); // create an STSClient for each endpointURI. this.clients = new STSClient[endpointURIs.length]; Builder builder = new STSClientConfig.Builder(); builder.serviceName(serviceName).portName(port).username(secInfo.username).password(secInfo.passwd); STSClientPool pool = STSClientFactory.getInstance(); int index = 0; for (String endpointURI : endpointURIs) { builder.endpointAddress(endpointURI); STSClientConfig config = builder.build(); pool.createPool(config); this.clients[index++] = pool.getClient(config); } }
public WSTrustClient(String serviceName, String port, String[] endpointURIs, SecurityInfo secInfo) throws ParsingException { // basic input validation. if (serviceName == null || port == null || endpointURIs == null || secInfo == null) throw logger.nullArgumentError("The service name, port, endpoint URIs and security info parameters cannot be null"); if (endpointURIs.length == 0) throw logger.nullArgumentError("At least one endpoint URI must be provided"); // create an STSClient for each endpointURI. this.clients = new STSClient[endpointURIs.length]; Builder builder = new STSClientConfig.Builder(); 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()); } }
STSClient createSTSClient(final STSClientConfig.Builder builder) throws ParsingException { return STSClientFactory.getInstance().create(builder.build()); }
/** * This method gives users a chance to override how the {@link STSClientConfig} is created. * For example some users might perfer to not use a file containing the configuration * properties, which is the default, but instead have the configuration options in the * login modules configuration directly. * * @param options The options passed to the initialize method. * @return {@link STSClientConfig} The configuration for STSClient. */ protected STSClientConfig getConfiguration(final Map<String, ?> options) { final String configFile = getRequiredOption(options, STS_CONFIG_FILE); return new STSClientConfig.Builder(configFile).build(); }
STSClient createSTSClient(final STSClientConfig.Builder builder) throws ParsingException { return STSClientFactory.getInstance().create(builder.build()); }
/** * This method gives users a chance to override how the {@link STSClientConfig} is created. * For example some users might perfer to not use a file containing the configuration * properties, which is the default, but instead have the configuration options in the * login modules configuration directly. * * @param options The options passed to the initialize method. * @return {@link STSClientConfig} The configuration for STSClient. */ protected STSClientConfig getConfiguration(final Map<String, ?> options) { final String configFile = getRequiredOption(options, STS_CONFIG_FILE); return new STSClientConfig.Builder(configFile).build(); }
/** * This method gives users a chance to override how the {@link STSClientConfig} is created. For example some users might * perfer to not use a file containing the configuration properties, which is the default, but instead have the * configuration options in the login modules configuration directly. * * @param options The options passed to the initialize method. * @return {@link STSClientConfig} The configuration for STSClient. */ protected STSClientConfig getConfiguration(final Map<String, ?> options) { final String configFile = getRequiredOption(options, STS_CONFIG_FILE); return new STSClientConfig.Builder(configFile).build(); }
/** * This method gives users a chance to override how the {@link STSClientConfig} is created. For example some users might * perfer to not use a file containing the configuration properties, which is the default, but instead have the * configuration options in the login modules configuration directly. * * @param options The options passed to the initialize method. * @return {@link STSClientConfig} The configuration for STSClient. */ protected STSClientConfig getConfiguration(final Map<String, ?> options) { final String configFile = getRequiredOption(options, STS_CONFIG_FILE); return new STSClientConfig.Builder(configFile).build(); }
STSClient createSTSClient(final STSClientConfig.Builder builder) throws ParsingException { return STSClientFactory.getInstance().create(builder.build()); }
/** * This method gives users a chance to override how the {@link STSClientConfig} is created. For example some users might * perfer to not use a file containing the configuration properties, which is the default, but instead have the * configuration options in the login modules configuration directly. * * @param options The options passed to the initialize method. * @return {@link STSClientConfig} The configuration for STSClient. */ protected STSClientConfig getConfiguration(final Map<String, ?> options) { final String configFile = getRequiredOption(options, STS_CONFIG_FILE); return new STSClientConfig.Builder(configFile).build(); }