[seam-commits] Seam SVN: r12457 - in modules/security/trunk/impl/src/main/java/org/jboss/seam/security: jaas and 1 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Tue Apr 13 07:11:19 EDT 2010
Author: shane.bryzak at jboss.com
Date: 2010-04-13 07:11:17 -0400 (Tue, 13 Apr 2010)
New Revision: 12457
Modified:
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/IdentityImpl.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RememberMe.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RunAsOperation.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/SecurityInterceptor.java
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/permission/RuleBasedPermissionResolver.java
Log:
fix compiler errors
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/IdentityImpl.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/IdentityImpl.java 2010-04-13 11:04:07 UTC (rev 12456)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/IdentityImpl.java 2010-04-13 11:11:17 UTC (rev 12457)
@@ -621,4 +621,10 @@
subject = savedSubject;
}
}
+
+ public void checkRestriction(String expr)
+ {
+ // TODO Auto-generated method stub
+
+ }
}
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RememberMe.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RememberMe.java 2010-04-13 11:04:07 UTC (rev 12456)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RememberMe.java 2010-04-13 11:11:17 UTC (rev 12457)
@@ -8,17 +8,13 @@
import javax.enterprise.context.SessionScoped;
import javax.enterprise.event.Observes;
-import javax.inject.Inject;
import javax.enterprise.inject.spi.BeanManager;
+import javax.inject.Inject;
import javax.inject.Named;
-import org.jboss.seam.security.events.CredentialsInitializedEvent;
-import org.jboss.seam.security.events.LoggedOutEvent;
-import org.jboss.seam.security.events.PostAuthenticateEvent;
import org.jboss.seam.security.events.QuietLoginEvent;
import org.jboss.seam.security.management.IdentityManager;
import org.jboss.seam.security.util.Base64;
-//import org.jboss.seam.web.ManagedCookie;
/**
* Remember-me functionality is provided by this class, in two different flavours. The first mode
@@ -41,6 +37,7 @@
@Inject BeanManager manager;
@Inject Identity identity;
+ @Inject IdentityImpl identityImpl;
@Inject Credentials credentials;
@Inject IdentityManager identityManager;
@@ -147,7 +144,7 @@
// Double check our credentials again
if (tokenStore.validateToken(username, credentials.getPassword()))
{
- identity.runAs(new RunAsOperation(true) {
+ identityImpl.runAs(new RunAsOperation(true) {
@Override
public void execute()
{
@@ -165,8 +162,8 @@
if (userEnabled.value)
{
- identity.unAuthenticate();
- identity.preAuthenticate();
+ identityImpl.unAuthenticate();
+ identityImpl.preAuthenticate();
// populate the roles
for (String role : roles)
@@ -176,7 +173,7 @@
// Set the principal
identity.getSubject().getPrincipals().add(new SimplePrincipal(username));
- identity.postAuthenticate();
+ identityImpl.postAuthenticate();
autoLoggedIn = true;
}
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RunAsOperation.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RunAsOperation.java 2010-04-13 11:04:07 UTC (rev 12456)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RunAsOperation.java 2010-04-13 11:11:17 UTC (rev 12457)
@@ -51,14 +51,14 @@
{
for ( Group sg : getSubject().getPrincipals(Group.class) )
{
- if ( Identity.ROLES_GROUP.equals( sg.getName() ) )
+ if ( IdentityImpl.ROLES_GROUP.equals( sg.getName() ) )
{
sg.addMember(new SimplePrincipal(role));
break;
}
}
- SimpleGroup roleGroup = new SimpleGroup(Identity.ROLES_GROUP);
+ SimpleGroup roleGroup = new SimpleGroup(IdentityImpl.ROLES_GROUP);
roleGroup.addMember(new SimplePrincipal(role));
getSubject().getPrincipals().add(roleGroup);
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/SecurityInterceptor.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/SecurityInterceptor.java 2010-04-13 11:04:07 UTC (rev 12456)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/SecurityInterceptor.java 2010-04-13 11:11:17 UTC (rev 12457)
@@ -109,7 +109,7 @@
public void check(Identity identity, Object[] parameters)
{
- if (Identity.isSecurityEnabled())
+ if (IdentityImpl.isSecurityEnabled())
{
// TODO rewrite EL based restrictions
/*if (expression != null)
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-04-13 11:04:07 UTC (rev 12456)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/jaas/SeamLoginModule.java 2010-04-13 11:11:17 UTC (rev 12457)
@@ -1,6 +1,6 @@
package org.jboss.seam.security.jaas;
-import static org.jboss.seam.security.Identity.ROLES_GROUP;
+import static org.jboss.seam.security.IdentityImpl.ROLES_GROUP;
import java.security.acl.Group;
import java.util.HashSet;
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java 2010-04-13 11:04:07 UTC (rev 12456)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java 2010-04-13 11:11:17 UTC (rev 12457)
@@ -22,6 +22,7 @@
import org.drools.runtime.rule.FactHandle;
//import org.jboss.seam.drools.SeamGlobalResolver;
import org.jboss.seam.security.Identity;
+import org.jboss.seam.security.IdentityImpl;
import org.jboss.seam.security.Role;
import org.jboss.seam.security.events.LoggedOutEvent;
import org.jboss.seam.security.events.PostAuthenticateEvent;
@@ -208,7 +209,7 @@
for ( Group sg : identity.getSubject().getPrincipals(Group.class) )
{
- if ( Identity.ROLES_GROUP.equals( sg.getName() ) )
+ if ( IdentityImpl.ROLES_GROUP.equals( sg.getName() ) )
{
Enumeration e = sg.members();
while (e.hasMoreElements())
More information about the seam-commits
mailing list