Finds the user ID that is associated with an AuthenticityToken.
Finds the user ID that is associated with an AuthenticityToken. If Some[Id]
is returned, that is sufficient to
show that a user's session is valid.
The AuthenticityToken to verify.
The user ID associated with the AuthenticityToken within the IdContainer
, if there is one.
Otherwise, None
.
Does nothing, as the session is not stored server-side.
Does nothing, as the session is not stored server-side.
The AuthenticityToken of the session to prolong.
The new duration of the session. e.g. if there is 30 minutes left in a session, and a timeout of one hour is passed, the session will expire in one hour.
A successful Future
if the session was prolonged, or a failed Future
if the session isn't valid, or
some other error occurred.
Does nothing, as the session is not stored server-side.
Does nothing, as the session is not stored server-side.
The AuthenticityToken that is paired with the session to be destroyed.
A successful Future
if the session was destroyed, or a failed Future
if an error occurred.
Opens a new session for a user, and generates an AuthenticityToken that is paired with that user's ID.
Opens a new session for a user, and generates an AuthenticityToken that is paired with that user's ID.
The ID of the session the session will be created for.
How long the session will be valid before expiring in a stateful IdContainer
.
An AuthenticityToken to be given to the user to later verify their session is valid.
Provides a stateless implementation of IdContainer, where the session is meant to be stored in cookies only. This means that the server has no way of invalidating an individual user session, and the only way to do so would be to change the secret key of the application to invalidate all signed tokens.
The AuthenticityToken in this case is just the user ID, so it is required that the
Id
type has an available implementation of the ToString and FromString type classes. scala.Int, scala.Long, and java.lang.String are supported by default to cover most use-cases.The type of user ID that will be stored in the session.