Author: anil.saldhana(a)jboss.com
Date: 2011-04-23 02:23:54 -0400 (Sat, 23 Apr 2011)
New Revision: 908
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/AbstractSTSLoginModule.java
Log:
bring in additional keys for options and move the Builder creation to a separate
overridable method
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/AbstractSTSLoginModule.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/AbstractSTSLoginModule.java 2011-04-23
05:16:10 UTC (rev 907)
+++
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/AbstractSTSLoginModule.java 2011-04-23
06:23:54 UTC (rev 908)
@@ -194,6 +194,31 @@
public static final String GROUP_PRINCIPAL_NAME = "groupPrincipalName";
/**
+ * Key to specify the end point address
+ */
+ public static final String ENDPOINT_ADDRESS = "endpointAddress";
+
+ /**
+ * Key to specify the port name
+ */
+ public static final String PORT_NAME = "portName";
+
+ /**
+ * Key to specify the service name
+ */
+ public static final String SERVICE_NAME = "serviceName";
+
+ /**
+ * Key to specify the username
+ */
+ public static final String USERNAME_KEY = "username";
+
+ /**
+ * Key to specify the password
+ */
+ public static final String PASSWORD_KEY = "password";
+
+ /**
* The subject to be populated.
*/
protected Subject subject;
@@ -318,7 +343,7 @@
{
try
{
- final Builder builder = new
STSClientConfig.Builder(getRequiredOption(getOptions(), STS_CONFIG_FILE));
+ final Builder builder = createBuilder();
if (useOptionsCredentials)
{
useCredentialsFromOptions(builder, options);
@@ -395,6 +420,15 @@
return true;
}
+ /**
+ * Subclasses can override and create a preconfigured builder
+ * @return
+ */
+ protected Builder createBuilder()
+ {
+ return new STSClientConfig.Builder(getRequiredOption(getOptions(),
STS_CONFIG_FILE));
+ }
+
protected void useCredentialsFromCallback(final Builder builder) throws
LoginException
{
final NameCallback nameCallback = new NameCallback("user:");
Show replies by date