[seam-commits] Seam SVN: r13400 - modules/security/trunk/impl/src/main/java/org/jboss/seam/security/jaas.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Jul 14 23:21:40 EDT 2010


Author: shane.bryzak at jboss.com
Date: 2010-07-14 23:21:39 -0400 (Wed, 14 Jul 2010)
New Revision: 13400

Modified:
   modules/security/trunk/impl/src/main/java/org/jboss/seam/security/jaas/SeamLoginModule.java
Log:
fix authentication


Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/jaas/SeamLoginModule.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/jaas/SeamLoginModule.java	2010-07-15 03:15:53 UTC (rev 13399)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/jaas/SeamLoginModule.java	2010-07-15 03:21:39 UTC (rev 13400)
@@ -1,5 +1,6 @@
 package org.jboss.seam.security.jaas;
 
+import java.security.Principal;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
@@ -37,6 +38,21 @@
    
    protected String username;
    
+   public class SimplePrincipal implements Principal
+   {
+      private String name;
+      
+      public SimplePrincipal(String name)
+      {
+         this.name = name;
+      }
+      
+      public String getName()
+      {
+         return name;
+      }      
+   }
+   
    public boolean abort() throws LoginException
    {
       return true;
@@ -44,7 +60,7 @@
 
    public boolean commit() throws LoginException
    {        
-      //subject.getPrincipals().add(new SimplePrincipal(username));
+      subject.getPrincipals().add(new SimplePrincipal(username));
       return true;
    }
 



More information about the seam-commits mailing list