Module io.inverno.mod.session
Package io.inverno.mod.session
Interface SessionIdGenerator<A,B extends Session<A>>
- Type Parameters:
A
- the session data typeB
- the session type
- All Known Subinterfaces:
JWTSessionIdGenerator<A,
B>
- All Known Implementing Classes:
JWTESessionIdGenerator
,JWTSSessionIdGenerator
public interface SessionIdGenerator<A,B extends Session<A>>
A session identifier generator is used to generate unique session id.
Implementors must ensure that identifiers are generated in a way that ensures that there is negligible probability that the same value will be accidentally assigned to different sessions.
- Since:
- 1.13
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionGenerates a new identifier for the specified session.static <A,
B extends Session<A>>
SessionIdGenerator<A, B> uuid()
Returns a Base64 UUID session id generator.static <A,
B extends Session<A>>
SessionIdGenerator<A, B> uuid
(boolean base64Encoded) Returns a UUID session id generator.
-
Method Details
-
uuid
Returns a Base64 UUID session id generator.
- Type Parameters:
A
- the session data typeB
- the session type- Returns:
- a session id generator
-
uuid
Returns a UUID session id generator.
- Type Parameters:
A
- the session data typeB
- the session type- Parameters:
base64Encoded
- true to encode the identifier in Base64, false otherwise- Returns:
- a session id generator
-
generate
Generates a new identifier for the specified session.
- Parameters:
session
- a session- Returns:
- a mono generating a session id
-