java.lang.Object
iu.auth.session.SessionHandler
- All Implemented Interfaces:
IuSessionHandler
IuSessionHandler implementation-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classPurges all expired stored sessions. -
Constructor Summary
ConstructorsConstructorDescriptionSessionHandler(URI resourceUri, IuSessionConfiguration configuration, Supplier<WebKey> issuerKey, WebKey.Algorithm algorithm) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionactivate(Iterable<HttpCookie> cookies) Activates session for registered resource URIcreate()Create IuSession(package private) StringGets the session cookie name for a protected resource URI(package private) static StringhashKey(byte[] secretKey) Gets the hash key to use for storing tokenized session data.voidremove(Iterable<HttpCookie> cookies) Removes session from storageRekeys, tokenizes, and stores an active session.
-
Constructor Details
-
SessionHandler
public SessionHandler(URI resourceUri, IuSessionConfiguration configuration, Supplier<WebKey> issuerKey, WebKey.Algorithm algorithm) Constructor.- Parameters:
resourceUri- root protected resource URIconfiguration- {#linkIuSessionConfigurationissuerKey- issuer key supplieralgorithm- algorithm
-
-
Method Details
-
create
Description copied from interface:IuSessionHandlerCreate IuSession- Specified by:
createin interfaceIuSessionHandler- Returns:
IuSession
-
activate
Description copied from interface:IuSessionHandlerActivates session for registered resource URI- Specified by:
activatein interfaceIuSessionHandler- Parameters:
cookies-HttpCookie- Returns:
IuSession
-
store
Description copied from interface:IuSessionHandlerRekeys, tokenizes, and stores an active session.- Specified by:
storein interfaceIuSessionHandler- Parameters:
session-IuSession- Returns:
- response cookie attributes
-
remove
Description copied from interface:IuSessionHandlerRemoves session from storage- Specified by:
removein interfaceIuSessionHandler- Parameters:
cookies- cookies
-
hashKey
Gets the hash key to use for storing tokenized session data.- Parameters:
secretKey- secret key data- Returns:
- encoded digest of the session key
-
getSessionCookieName
String getSessionCookieName()Gets the session cookie name for a protected resource URI- Returns:
- session cookie name
-