java.lang.Object
iu.auth.session.SessionHandler
- All Implemented Interfaces:
IuSessionHandler
IuSessionHandler
implementation-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
Purges 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) String
Gets the session cookie name for a protected resource URI(package private) static String
hashKey
(byte[] secretKey) Gets the hash key to use for storing tokenized session data.void
remove
(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
- {#linkIuSessionConfiguration
issuerKey
- issuer key supplieralgorithm
- algorithm
-
-
Method Details
-
create
Description copied from interface:IuSessionHandler
Create IuSession- Specified by:
create
in interfaceIuSessionHandler
- Returns:
IuSession
-
activate
Description copied from interface:IuSessionHandler
Activates session for registered resource URI- Specified by:
activate
in interfaceIuSessionHandler
- Parameters:
cookies
-HttpCookie
- Returns:
IuSession
-
store
Description copied from interface:IuSessionHandler
Rekeys, tokenizes, and stores an active session.- Specified by:
store
in interfaceIuSessionHandler
- Parameters:
session
-IuSession
- Returns:
- response cookie attributes
-
remove
Description copied from interface:IuSessionHandler
Removes session from storage- Specified by:
remove
in 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
-