[seam-commits] Seam SVN: r12488 - in modules/security/trunk: impl/src/main/java/org/jboss/seam/security and 1 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Apr 14 05:58:07 EDT 2010
Author: shane.bryzak at jboss.com
Date: 2010-04-14 05:58:06 -0400 (Wed, 14 Apr 2010)
New Revision: 12488
Added:
modules/security/trunk/api/src/main/java/org/jboss/seam/security/events/PostLoggedOutEvent.java
modules/security/trunk/api/src/main/java/org/jboss/seam/security/events/PreLoggedOutEvent.java
Removed:
modules/security/trunk/api/src/main/java/org/jboss/seam/security/events/LoggedOutEvent.java
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/permission/RuleBasedPermissionResolver.java
Log:
JBSEAM-4124
Deleted: modules/security/trunk/api/src/main/java/org/jboss/seam/security/events/LoggedOutEvent.java
===================================================================
--- modules/security/trunk/api/src/main/java/org/jboss/seam/security/events/LoggedOutEvent.java 2010-04-14 09:38:28 UTC (rev 12487)
+++ modules/security/trunk/api/src/main/java/org/jboss/seam/security/events/LoggedOutEvent.java 2010-04-14 09:58:06 UTC (rev 12488)
@@ -1,23 +0,0 @@
-package org.jboss.seam.security.events;
-
-import java.security.Principal;
-
-/**
- * This event is raised just after the user unauthenticates
- *
- * @author Shane Bryzak
- */
-public class LoggedOutEvent
-{
- private Principal principal;
-
- public LoggedOutEvent(Principal principal)
- {
- this.principal = principal;
- }
-
- public Principal getPrincipal()
- {
- return principal;
- }
-}
Copied: modules/security/trunk/api/src/main/java/org/jboss/seam/security/events/PostLoggedOutEvent.java (from rev 12461, modules/security/trunk/api/src/main/java/org/jboss/seam/security/events/LoggedOutEvent.java)
===================================================================
--- modules/security/trunk/api/src/main/java/org/jboss/seam/security/events/PostLoggedOutEvent.java (rev 0)
+++ modules/security/trunk/api/src/main/java/org/jboss/seam/security/events/PostLoggedOutEvent.java 2010-04-14 09:58:06 UTC (rev 12488)
@@ -0,0 +1,23 @@
+package org.jboss.seam.security.events;
+
+import java.security.Principal;
+
+/**
+ * This event is raised just after the user unauthenticates
+ *
+ * @author Shane Bryzak
+ */
+public class PostLoggedOutEvent
+{
+ private Principal principal;
+
+ public PostLoggedOutEvent(Principal principal)
+ {
+ this.principal = principal;
+ }
+
+ public Principal getPrincipal()
+ {
+ return principal;
+ }
+}
Added: modules/security/trunk/api/src/main/java/org/jboss/seam/security/events/PreLoggedOutEvent.java
===================================================================
--- modules/security/trunk/api/src/main/java/org/jboss/seam/security/events/PreLoggedOutEvent.java (rev 0)
+++ modules/security/trunk/api/src/main/java/org/jboss/seam/security/events/PreLoggedOutEvent.java 2010-04-14 09:58:06 UTC (rev 12488)
@@ -0,0 +1,11 @@
+package org.jboss.seam.security.events;
+
+/**
+ * This event is raised just before the user unauthenticates
+ *
+ * @author Shane Bryzak
+ */
+public class PreLoggedOutEvent
+{
+
+}
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-14 09:38:28 UTC (rev 12487)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/IdentityImpl.java 2010-04-14 09:58:06 UTC (rev 12488)
@@ -31,12 +31,13 @@
import org.jboss.seam.security.callbacks.IdentityManagerCallback;
import org.jboss.seam.security.events.AlreadyLoggedInEvent;
import org.jboss.seam.security.events.LoggedInEvent;
-import org.jboss.seam.security.events.LoggedOutEvent;
+import org.jboss.seam.security.events.PostLoggedOutEvent;
import org.jboss.seam.security.events.LoginFailedEvent;
import org.jboss.seam.security.events.NotAuthorizedEvent;
import org.jboss.seam.security.events.NotLoggedInEvent;
import org.jboss.seam.security.events.PostAuthenticateEvent;
import org.jboss.seam.security.events.PreAuthenticateEvent;
+import org.jboss.seam.security.events.PreLoggedOutEvent;
import org.jboss.seam.security.events.QuietLoginEvent;
import org.jboss.seam.security.management.IdentityManager;
import org.jboss.seam.security.permission.PermissionMapper;
@@ -434,7 +435,9 @@
{
if (isLoggedIn())
{
- LoggedOutEvent loggedOutEvent = new LoggedOutEvent(principal);
+ PostLoggedOutEvent loggedOutEvent = new PostLoggedOutEvent(principal);
+
+ manager.fireEvent(new PreLoggedOutEvent());
unAuthenticate();
// TODO - invalidate the session
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-14 09:38:28 UTC (rev 12487)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java 2010-04-14 09:58:06 UTC (rev 12488)
@@ -24,7 +24,7 @@
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.PostLoggedOutEvent;
import org.jboss.seam.security.events.PostAuthenticateEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -188,7 +188,7 @@
}
@SuppressWarnings("unchecked")
- public void unAuthenticate(@Observes LoggedOutEvent event)
+ public void unAuthenticate(@Observes PostLoggedOutEvent event)
{
if (getSecurityContext() != null)
{
More information about the seam-commits
mailing list