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.
Returns an Option[String] of the uri of the service to proxy to
Returns an Option[String] of the uri of the service to proxy to
The path of the request
The service to proxy to
Proxies the given path
Proxies the given path
Path of the request
Proxies request to both core and resolver
Proxies request to both core and resolver
The path of the request
Authenticates a user
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:
Renders index.html
Renders index.html
OK response and index html
Renders the login form
Renders the login form
OK response and login.html
Where to redirect the user after a successful login.
Where to redirect the user after a successful login.
Logs out a user
Where to redirect the user after logging out
Where to redirect the user after logging out
Proxies the request to the given service
Proxies the request to the given service
Uri of the service to proxy to
request to proxy
The proxied request
Find a user by id
Find a user by id
The Id of the user
Future option of user
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
The main application controller. Handles authentication and request proxying.