[jboss-cvs] jboss-seam/src/main/org/jboss/seam/security ...
Shane Bryzak
Shane_Bryzak at symantec.com
Sat Jan 27 09:44:13 EST 2007
User: sbryzak2
Date: 07/01/27 09:44:13
Modified: src/main/org/jboss/seam/security Identity.java
Log:
cleaned up
Revision Changes Path
1.22 +7 -12 jboss-seam/src/main/org/jboss/seam/security/Identity.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Identity.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/security/Identity.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- Identity.java 27 Jan 2007 12:39:24 -0000 1.21
+++ Identity.java 27 Jan 2007 14:44:13 -0000 1.22
@@ -56,7 +56,7 @@
{
private static final long serialVersionUID = 3751659008033189259L;
- private static final String DEFAULT_CONFIG_NAME = "default";
+ private static final String DEFAULT_JAAS_CONFIG_NAME = "default";
private class LoginModuleConfiguration extends Configuration
{
@@ -96,7 +96,6 @@
@Create
public void create()
{
- subject = new Subject();
securityContext = securityRules.newWorkingMemory(false);
}
@@ -190,11 +189,13 @@
public void login(LoginContext loginContext)
throws LoginException
{
+ subject = new Subject();
+
CallbackHandler handler = createCallbackHandler(username, password);
if (loginContext == null)
{
- loginContext = new LoginContext(DEFAULT_CONFIG_NAME, subject, handler,
+ loginContext = new LoginContext(DEFAULT_JAAS_CONFIG_NAME, subject, handler,
getConfiguration());
}
@@ -255,7 +256,7 @@
{
if (securityContext.getFactHandle(value) == null)
{
- handles.add(securityContext.assertObject(arg));
+ handles.add(securityContext.assertObject(value));
}
}
}
@@ -265,12 +266,6 @@
}
}
- // this doesn't work?
-// for (String nm : Contexts.getMethodContext().getNames())
-// {
-// handles.add(securityContext.assertObject(Contexts.getMethodContext().get(nm)));
-// }
-
securityContext.fireAllRules();
for (FactHandle handle : handles)
@@ -329,7 +324,7 @@
new AppConfigurationEntry(SeamLoginModule.class.getName(),
LoginModuleControlFlag.REQUIRED, options)
};
- defaultConfig.addEntry(DEFAULT_CONFIG_NAME, entries);
+ defaultConfig.addEntry(DEFAULT_JAAS_CONFIG_NAME, entries);
}
}
More information about the jboss-cvs-commits
mailing list