Author: anil.saldhana(a)jboss.com
Date: 2011-03-15 18:40:28 -0400 (Tue, 15 Mar 2011)
New Revision: 821
Modified:
federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML2STSLoginModule.java
Log:
bring back lost stefan's Revision: 799 changes
Modified:
federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML2STSLoginModule.java
===================================================================
---
federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML2STSLoginModule.java 2011-03-15
22:31:14 UTC (rev 820)
+++
federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML2STSLoginModule.java 2011-03-15
22:40:28 UTC (rev 821)
@@ -125,7 +125,7 @@
protected String groupName = "Roles";
protected Map<String, ?> options = null;
-
+
/*
* (non-Javadoc)
* @see
org.jboss.security.auth.spi.AbstractServerLoginModule#initialize(javax.security.auth.Subject,
javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)
@@ -135,24 +135,25 @@
Map<String, ?> options)
{
super.initialize(subject, callbackHandler, sharedState, options);
- // check if the options contain the name of the STS configuration file.
- this.stsConfigurationFile = (String) options.get("configFile");
+ this.options = options;
+ // save the config file and cache validation options, removing them from the map -
all remaining properties will
+ // be set in the request context of the Dispatch instance used to send requests to
the STS.
+ this.stsConfigurationFile = (String) this.options.remove("configFile");
+ String cacheInvalidation = (String)
this.options.remove("cache.invalidation");
+ if (cacheInvalidation != null && !cacheInvalidation.isEmpty())
+ {
+ this.enableCacheInvalidation = Boolean.parseBoolean(cacheInvalidation);
+ this.securityDomain = (String)
this.options.remove(SecurityConstants.SECURITY_DOMAIN_OPTION);
+ if (this.securityDomain == null || this.securityDomain.isEmpty())
+ throw new RuntimeException("Please configure option:" +
SecurityConstants.SECURITY_DOMAIN_OPTION);
+ }
+
String groupNameStr = (String) options.get("groupPrincipalName");
if (StringUtil.isNotNull(groupNameStr))
{
groupName = groupNameStr.trim();
}
-
- String cacheInvalidation = (String) options.get("cache.invalidation");
- if (cacheInvalidation != null && !cacheInvalidation.isEmpty())
- {
- enableCacheInvalidation = Boolean.parseBoolean(cacheInvalidation);
- securityDomain = (String)
options.get(SecurityConstants.SECURITY_DOMAIN_OPTION);
- if (securityDomain == null || securityDomain.isEmpty())
- throw new RuntimeException("Please configure option:" +
SecurityConstants.SECURITY_DOMAIN_OPTION);
- }
-
}
/*
Show replies by date