[java-identity-provider COMMIT] in /trunk: idp-session-api/src/main/java/net/shibboleth/idp/session/SessionManager.ja...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Oct 9 12:37:47 EDT 2013
Author: scantor
Date: Wed Oct 9 12:37:47 2013
New Revision: 4840
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4840&view=rev
Log:
Hide access to servlet objects via injected properties.
Modified:
trunk/idp-session-api/src/main/java/net/shibboleth/idp/session/SessionManager.java
trunk/idp-session-impl/src/main/java/net/shibboleth/idp/session/impl/StorageBackedSessionManager.java
trunk/idp-session-impl/src/test/java/net/shibboleth/idp/session/impl/StorageBackedSessionManagerTest.java
Modified: trunk/idp-session-api/src/main/java/net/shibboleth/idp/session/SessionManager.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-session-api/src/main/java/net/shibboleth/idp/session/SessionManager.java?rev=4840&r1=4839&r2=4840&view=diff
==============================================================================
--- trunk/idp-session-api/src/main/java/net/shibboleth/idp/session/SessionManager.java (original)
+++ trunk/idp-session-api/src/main/java/net/shibboleth/idp/session/SessionManager.java Wed Oct 9 12:37:47 2013
@@ -20,8 +20,6 @@
import javax.annotation.Nonnull;
import javax.annotation.concurrent.ThreadSafe;
-import org.opensaml.profile.context.ProfileRequestContext;
-
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
import net.shibboleth.utilities.java.support.component.DestructableComponent;
import net.shibboleth.utilities.java.support.component.IdentifiableComponent;
@@ -38,29 +36,25 @@
/**
* Create and return a new {@link IdPSession} object for a subject.
*
- * <p>The new session object will be appropriately persisted and/or bound to the
- * {@link ProfileRequestContext} by the time it's returned.</p>
+ * <p>Implementations may perform additional work to persist or associate the session
+ * with the client.</p>
*
- * @param profileRequestContext profile request context
* @param principalName canonical name of the subject of the session
*
* @return the newly created session
* @throws SessionException if the session cannot be created
*/
- @Nonnull public IdPSession createSession(@Nonnull final ProfileRequestContext profileRequestContext,
- @Nonnull @NotEmpty final String principalName)
- throws SessionException;
+ @Nonnull public IdPSession createSession(@Nonnull @NotEmpty final String principalName)
+ throws SessionException;
/**
* Invalidates or otherwise removes a session from persistent storage and/or unbinds it
- * from a {@link ProfileRequestContext}.
+ * from a client.
*
- * @param profileRequestContext profile request context
* @param sessionId the unique ID of the session to destroy
*
* @throws SessionException if the session cannot be destroyed
*/
- public void destroySession(@Nonnull final ProfileRequestContext profileRequestContext,
- @Nonnull @NotEmpty final String sessionId) throws SessionException;
+ public void destroySession(@Nonnull @NotEmpty final String sessionId) throws SessionException;
}
Modified: trunk/idp-session-impl/src/main/java/net/shibboleth/idp/session/impl/StorageBackedSessionManager.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-session-impl/src/main/java/net/shibboleth/idp/session/impl/StorageBackedSessionManager.java?rev=4840&r1=4839&r2=4840&view=diff
==============================================================================
--- trunk/idp-session-impl/src/main/java/net/shibboleth/idp/session/impl/StorageBackedSessionManager.java (original)
+++ trunk/idp-session-impl/src/main/java/net/shibboleth/idp/session/impl/StorageBackedSessionManager.java Wed Oct 9 12:37:47 2013
@@ -24,8 +24,9 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-
-import org.opensaml.profile.context.ProfileRequestContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
import org.opensaml.storage.RequestScopedStorageService;
import org.opensaml.storage.StorageRecord;
import org.opensaml.storage.StorageSerializer;
@@ -58,6 +59,7 @@
import net.shibboleth.utilities.java.support.component.ComponentSupport;
import net.shibboleth.utilities.java.support.component.ComponentValidationException;
import net.shibboleth.utilities.java.support.logic.Constraint;
+import net.shibboleth.utilities.java.support.net.CookieManager;
import net.shibboleth.utilities.java.support.primitive.StringSupport;
import net.shibboleth.utilities.java.support.resolver.CriteriaSet;
import net.shibboleth.utilities.java.support.resolver.ResolverException;
@@ -102,11 +104,17 @@
@Nonnull @NotEmpty public static final String SESSION_MASTER_KEY = "_session";
/** Default cookie name for session tracking. */
- @Nonnull @NotEmpty private static final String DEFAULT_COOKIE_NAME = "shib_idp_session";
+ @Nonnull @NotEmpty protected static final String DEFAULT_COOKIE_NAME = "shib_idp_session";
/** Class logger. */
[... 648 lines stripped ...]
More information about the commits
mailing list