You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by an...@apache.org on 2015/07/03 14:50:33 UTC

tomee git commit: Set Identity timeout

Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x ea67c41ef -> 9fcbdf922


Set Identity timeout


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/9fcbdf92
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/9fcbdf92
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/9fcbdf92

Branch: refs/heads/tomee-1.7.x
Commit: 9fcbdf922e6f507e01cfe88a427539ee034d068c
Parents: ea67c41
Author: AndyGee <an...@gmx.de>
Authored: Fri Jul 3 14:50:06 2015 +0200
Committer: AndyGee <an...@gmx.de>
Committed: Fri Jul 3 14:50:06 2015 +0200

----------------------------------------------------------------------
 .../apache/openejb/core/security/AbstractSecurityService.java   | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/9fcbdf92/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java b/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java
index 0fad963..f40bf09 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java
@@ -226,9 +226,13 @@ public abstract class AbstractSecurityService implements SecurityService<UUID>,
     }
 
     protected UUID registerSubject(final Subject subject, final long accessTimeout) {
+
         final Identity identity = new Identity(subject);
+        identity.setTimeout(accessTimeout);
+
         final UUID token = identity.getToken();
         identities.put(token, identity);
+
         return token;
     }
 
@@ -261,6 +265,7 @@ public abstract class AbstractSecurityService implements SecurityService<UUID>,
             throw new LoginException("Identity is not currently logged in: " + securityIdentity);
         }
 
+        identity.access();
         clientIdentity.set(identity);
     }