portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r702097 - /portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/DefaultLoginModule.java
Date Mon, 06 Oct 2008 11:11:10 GMT
Author: ate
Date: Mon Oct  6 04:11:09 2008
New Revision: 702097

URL: http://svn.apache.org/viewvc?rev=702097&view=rev
Log:
Adding User.class principal to JAAS/container Subject too 

Modified:
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/DefaultLoginModule.java

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/DefaultLoginModule.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/DefaultLoginModule.java?rev=702097&r1=702096&r2=702097&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/DefaultLoginModule.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/DefaultLoginModule.java
Mon Oct  6 04:11:09 2008
@@ -17,7 +17,6 @@
 package org.apache.jetspeed.security.impl;
 
 import java.security.Principal;
-import java.util.List;
 import java.util.Map;
 
 import javax.security.auth.Subject;
@@ -34,7 +33,7 @@
 import org.apache.jetspeed.security.AuthenticatedUser;
 import org.apache.jetspeed.security.LoginModuleProxy;
 import org.apache.jetspeed.security.Role;
-import org.apache.jetspeed.security.SecurityHelper;
+import org.apache.jetspeed.security.SubjectHelper;
 import org.apache.jetspeed.security.User;
 import org.apache.jetspeed.security.UserManager;
 import org.apache.jetspeed.security.AuthenticationProvider;
@@ -301,10 +300,10 @@
     protected void commitSubject(Subject containerSubject, Subject jetspeedSubject, AuthenticatedUser
user)
     {
         // add user specific portal user name and roles
-        Principal userSubjectPrincipal = SecurityHelper.getPrincipal(jetspeedSubject, UserSubjectPrincipal.class);
-        subject.getPrincipals().add(userSubjectPrincipal);
+        subject.getPrincipals().add(SubjectHelper.getPrincipal(jetspeedSubject, UserSubjectPrincipal.class));
+        subject.getPrincipals().add(SubjectHelper.getPrincipal(jetspeedSubject, User.class));
         boolean hasPortalUserRole = false;
-        for (Principal role : SecurityHelper.getPrincipals(jetspeedSubject, Role.class))
+        for (Principal role : SubjectHelper.getPrincipals(jetspeedSubject, Role.class))
         {
             subject.getPrincipals().add(role);
             if (role.getName().equals(portalUserRole))



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message