Requires an AuthConfig to determine the default Result
to return to the user once logged-in.
The IdContainer that will store the session server-side.
The TokenAccessor that will store the session client-side.
Creates a new session for a user, and allows a custom result (different than from the AuthConfig) to be returned to them once the session has been created.
Creates a new session for a user, and allows a custom result (different than from the AuthConfig) to be returned to them once the session has been created.
The ID of the user to grant the session to.
The Result
to return to the user once their session is created.
The given Result
with an AuthenticityToken included.
Creates a new session for a user.
Creates a new session for a user.
The ID of the user to grant the session to.
The default Result
defined in the AuthConfig when the user is logged-in, with an AuthenticityToken
included.
The
Login
component provides the user's first entry point into Play Sentry via your application.It is up to your application to decide when a user is to be logged-in (i.e. provides the correct credentials to a login form of some kind), and from there your controller can use this component to create a session for that user by their ID. To use it, you simply inject
Login
into your controller, and callgotoLoginSucceeded(userId)
when you want to grant a session to a user linked to a particularuserId
.The environment type of your application.