A type that is defined by every action for authorization.
A type that is defined by every action for authorization. This sample uses the following trait:
sealed trait Role case object Administrator extends Role case object NormalUser extends Role
A type that is used to identify a user.
A type that is used to identify a user.
String
, Int
, Long
and so on.
A type that represents a user in your application.
A type that represents a user in your application.
User
, Account
and so on.
A function that returns a User
object from an Id
.
A function that returns a User
object from an Id
.
You can alter the procedure to suit your application.
If the user is not logged in and tries to access a protected resource then redirct them as follows:
If the user is not logged in and tries to access a protected resource then redirct them as follows:
If authorization failed (usually incorrect password) redirect the user as follows:
If authorization failed (usually incorrect password) redirect the user as follows:
A function that determines what Authority
a user has.
A function that determines what Authority
a user has.
You should alter this procedure to suit your application.
A ClassTag
is used to retrieve an id from the Cache API.
A ClassTag
is used to retrieve an id from the Cache API.
Use something like this:
Where to redirect the user after a successful login.
Where to redirect the user after a successful login.
Where to redirect the user after logging out
Where to redirect the user after logging out
The session timeout in seconds
The session timeout in seconds
(Optional) You can custom SessionID Token handler.
(Optional) You can custom SessionID Token handler. Default implemntation use Cookie.
(Since version 0.13.1) it will be deleted since 0.14.0. use CookieTokenAccessor constructor
(Since version 0.13.1) it will be deleted since 0.14.0. use CookieTokenAccessor constructor
(Since version 0.13.1) it will be deleted since 0.14.x. use CookieTokenAccessor constructor
(Since version 0.13.1) it will be deleted since 0.14.0. use CookieTokenAccessor constructor
(Since version 0.13.1) it will be deleted since 0.14.0. use CookieTokenAccessor constructor
(Since version 0.13.1) it will be deleted since 0.14.0. use CookieTokenAccessor constructor
Trait for authentication implicits.