[java-identity-provider COMMIT] in /trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session: AuthenticationEvent...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Aug 2 02:36:07 BST 2011
Author: lajoie
Date: Tue Aug 2 02:36:07 2011
New Revision: 3998
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=3998&view=rev
Log:
More Session API work
Added:
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session/SessionManager.java (with props)
Modified:
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session/AuthenticationEvent.java
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session/BasicSessionManager.java
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session/IdPSession.java
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session/ServiceSession.java
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session/SessionResolver.java
Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session/AuthenticationEvent.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session/AuthenticationEvent.java?rev=3998&r1=3997&r2=3998&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session/AuthenticationEvent.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session/AuthenticationEvent.java Tue Aug 2 02:36:07 2011
@@ -23,11 +23,13 @@
import org.opensaml.util.Assert;
import org.opensaml.util.StringSupport;
+//TODO implement hashCode/equals - need to implement this for AbstractSubcontextContainer as well
+
/**
* Describes an authentication event that took place within the scope of an {@link IdPSession}.
*
* Properties of this object <strong>must not</strong> be modifiable directly. Instead, use the modification methods
- * available via the {@link BasicSessionManager} that created the associate {@link IdPSession}.
+ * available via the {@link SessionManager} that created the associate {@link IdPSession}.
*/
public class AuthenticationEvent extends AbstractSubcontextContainer {
Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session/BasicSessionManager.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session/BasicSessionManager.java?rev=3998&r1=3997&r2=3998&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session/BasicSessionManager.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session/BasicSessionManager.java Tue Aug 2 02:36:07 2011
@@ -23,10 +23,16 @@
import java.util.Collections;
import java.util.Map;
-import net.shibboleth.idp.AbstractComponent;
-
import org.opensaml.messaging.context.Subcontext;
import org.opensaml.util.Assert;
+import org.opensaml.util.ObjectSupport;
+import org.opensaml.util.StringSupport;
+import org.opensaml.util.component.ComponentInitializationException;
+import org.opensaml.util.component.ComponentValidationException;
+import org.opensaml.util.component.InitializableComponent;
+import org.opensaml.util.component.UninitializedComponentException;
+import org.opensaml.util.component.UnmodifiableComponent;
+import org.opensaml.util.component.UnmodifiableComponentException;
import org.opensaml.util.criteria.EvaluableCriterion;
import org.opensaml.util.resolver.ResolverException;
import org.slf4j.Logger;
@@ -34,13 +40,20 @@
import edu.vt.middleware.crypt.util.HexConverter;
-/** Component that creates, manages and locates session. */
-public class BasicSessionManager extends AbstractComponent implements SessionResolver {
+/**
+ * Component that creates, manages and locates session.
+ *
+ * All modifications made to a session result in the session being stored back in to the session (i.e.,
+ * {@link Map#put(Object, Object)} is called). This allows session stores which replicate information to know that the
+ * session has been updated and information needs to be pushed out.
+ */
+public class BasicSessionManager implements SessionResolver, SessionManager, InitializableComponent,
+ UnmodifiableComponent {
/** Class logger. */
private final Logger log = LoggerFactory.getLogger(BasicSessionManager.class);
- /** Number of random bits within a session ID. */
+ /** Number of random bits within a session ID. Default value: {@value} */
private final int sessionIDSize = 32;
/** A {@link SecureRandom} PRNG to generate session IDs. */
@@ -49,54 +62,131 @@
/** Converts byte to hex and vice versa. */
private final HexConverter hexCodec;
+ /** Whether this component has been initialized. */
+ private boolean initialized;
+
+ /** The unique identifier for this session manager. */
+ private String id;
+
/**
* Maximum amount of time, in milliseconds, for which a session is valid. A value of 0 or less indicates that the
- * session does not have an absolute timeout.
- */
- private final long sessionLifetime;
+ * session does not have an absolute timeout. Default value: {@value}
+ */
+ private long sessionLifetime = 1000 * 60 * 60 * 8;
[... 413 lines stripped ...]
More information about the commits
mailing list