[seam-commits] Seam SVN: r10595 - modules/trunk/security/src/main/java/org/jboss/seam/security.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Apr 22 18:51:34 EDT 2009
Author: shane.bryzak at jboss.com
Date: 2009-04-22 18:51:33 -0400 (Wed, 22 Apr 2009)
New Revision: 10595
Added:
modules/trunk/security/src/main/java/org/jboss/seam/security/JaasConfiguration.java
Removed:
modules/trunk/security/src/main/java/org/jboss/seam/security/Configuration.java
Modified:
modules/trunk/security/src/main/java/org/jboss/seam/security/Identity.java
Log:
renamed to JaasConfiguration
Deleted: modules/trunk/security/src/main/java/org/jboss/seam/security/Configuration.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/Configuration.java 2009-04-22 22:46:35 UTC (rev 10594)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/Configuration.java 2009-04-22 22:51:33 UTC (rev 10595)
@@ -1,52 +0,0 @@
-package org.jboss.seam.security;
-
-import java.util.HashMap;
-
-import javax.context.ApplicationScoped;
-import javax.inject.Produces;
-import javax.security.auth.login.AppConfigurationEntry;
-import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag;
-
-import org.jboss.seam.security.jaas.SeamLoginModule;
-
-/**
- * Factory for the JAAS Configuration used by Seam Security.
- *
- * @author Shane Bryzak
- *
- */
-public class Configuration
-{
- static final String DEFAULT_JAAS_CONFIG_NAME = "default";
-
- protected javax.security.auth.login.Configuration createConfiguration()
- {
- return new javax.security.auth.login.Configuration()
- {
- private AppConfigurationEntry[] aces = { createAppConfigurationEntry() };
-
- @Override
- public AppConfigurationEntry[] getAppConfigurationEntry(String name)
- {
- return DEFAULT_JAAS_CONFIG_NAME.equals(name) ? aces : null;
- }
-
- @Override
- public void refresh() {}
- };
- }
-
- protected AppConfigurationEntry createAppConfigurationEntry()
- {
- return new AppConfigurationEntry(
- SeamLoginModule.class.getName(),
- LoginModuleControlFlag.REQUIRED,
- new HashMap<String,String>()
- );
- }
-
- @Produces @ApplicationScoped javax.security.auth.login.Configuration getConfiguration()
- {
- return createConfiguration();
- }
-}
Modified: modules/trunk/security/src/main/java/org/jboss/seam/security/Identity.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/Identity.java 2009-04-22 22:46:35 UTC (rev 10594)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/Identity.java 2009-04-22 22:51:33 UTC (rev 10595)
@@ -351,8 +351,8 @@
credentials.createCallbackHandler());
}
- return new LoginContext(Configuration.DEFAULT_JAAS_CONFIG_NAME, getSubject(),
- credentials.createCallbackHandler(), Configuration.instance());
+ return new LoginContext(JaasConfiguration.DEFAULT_JAAS_CONFIG_NAME, getSubject(),
+ credentials.createCallbackHandler(), JaasConfiguration.instance());
}
public void logout()
Added: modules/trunk/security/src/main/java/org/jboss/seam/security/JaasConfiguration.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/JaasConfiguration.java (rev 0)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/JaasConfiguration.java 2009-04-22 22:51:33 UTC (rev 10595)
@@ -0,0 +1,52 @@
+package org.jboss.seam.security;
+
+import java.util.HashMap;
+
+import javax.context.ApplicationScoped;
+import javax.inject.Produces;
+import javax.security.auth.login.AppConfigurationEntry;
+import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag;
+
+import org.jboss.seam.security.jaas.SeamLoginModule;
+
+/**
+ * Factory for the JAAS Configuration used by Seam Security.
+ *
+ * @author Shane Bryzak
+ *
+ */
+public class JaasConfiguration
+{
+ static final String DEFAULT_JAAS_CONFIG_NAME = "default";
+
+ protected javax.security.auth.login.Configuration createConfiguration()
+ {
+ return new javax.security.auth.login.Configuration()
+ {
+ private AppConfigurationEntry[] aces = { createAppConfigurationEntry() };
+
+ @Override
+ public AppConfigurationEntry[] getAppConfigurationEntry(String name)
+ {
+ return DEFAULT_JAAS_CONFIG_NAME.equals(name) ? aces : null;
+ }
+
+ @Override
+ public void refresh() {}
+ };
+ }
+
+ protected AppConfigurationEntry createAppConfigurationEntry()
+ {
+ return new AppConfigurationEntry(
+ SeamLoginModule.class.getName(),
+ LoginModuleControlFlag.REQUIRED,
+ new HashMap<String,String>()
+ );
+ }
+
+ @Produces @ApplicationScoped javax.security.auth.login.Configuration getConfiguration()
+ {
+ return createConfiguration();
+ }
+}
More information about the seam-commits
mailing list