[Jboss-cvs] JBossAS SVN: r57078 - branches/Branch_4_0/testsuite/src/main/org/jboss/test/security/ejb
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Sep 22 11:02:41 EDT 2006
Author: anil.saldhana at jboss.com
Date: 2006-09-22 11:02:40 -0400 (Fri, 22 Sep 2006)
New Revision: 57078
Modified:
branches/Branch_4_0/testsuite/src/main/org/jboss/test/security/ejb/CustomPrincipalImpl.java
branches/Branch_4_0/testsuite/src/main/org/jboss/test/security/ejb/CustomPrincipalLoginModule.java
Log:
JBAS-3687: make the login module place principal on shared state
Modified: branches/Branch_4_0/testsuite/src/main/org/jboss/test/security/ejb/CustomPrincipalImpl.java
===================================================================
--- branches/Branch_4_0/testsuite/src/main/org/jboss/test/security/ejb/CustomPrincipalImpl.java 2006-09-22 14:56:18 UTC (rev 57077)
+++ branches/Branch_4_0/testsuite/src/main/org/jboss/test/security/ejb/CustomPrincipalImpl.java 2006-09-22 15:02:40 UTC (rev 57078)
@@ -21,6 +21,7 @@
*/
package org.jboss.test.security.ejb;
+import java.io.Serializable;
import java.security.Principal;
/** A custom Principal implementation. This class must compare to other
@@ -30,7 +31,7 @@
* @version $Revision$
*/
public class CustomPrincipalImpl
- implements Principal
+ implements Principal, Serializable
{
private String name;
Modified: branches/Branch_4_0/testsuite/src/main/org/jboss/test/security/ejb/CustomPrincipalLoginModule.java
===================================================================
--- branches/Branch_4_0/testsuite/src/main/org/jboss/test/security/ejb/CustomPrincipalLoginModule.java 2006-09-22 14:56:18 UTC (rev 57077)
+++ branches/Branch_4_0/testsuite/src/main/org/jboss/test/security/ejb/CustomPrincipalLoginModule.java 2006-09-22 15:02:40 UTC (rev 57078)
@@ -42,6 +42,8 @@
if (super.login())
{
caller = new CustomPrincipalImpl(getUsername());
+ if(this.useFirstPass)
+ this.sharedState.put("javax.security.auth.login.name", caller);
return true;
}
return false;
@@ -82,5 +84,9 @@
{
return "theduke";
}
-
+
+ protected Principal createIdentity(String username) throws Exception
+ {
+ return new CustomPrincipalImpl(username);
+ }
}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list