new AuthHandler()
Base interface for auth handlers.
An auth handler allows your application to provide authentication/authorization support.
- Source:
Methods
addAuthorities(authorities) → {AuthHandler}
Add a set of required authorities for this auth handler
Parameters:
| Name | Type | Description |
|---|---|---|
authorities |
Array.<string> | the set of authorities |
- Source:
Returns:
a reference to this, so the API can be used fluently
- Type
- AuthHandler
addAuthority(authority) → {AuthHandler}
Add a required authority for this auth handler
Parameters:
| Name | Type | Description |
|---|---|---|
authority |
string | the authority |
- Source:
Returns:
a reference to this, so the API can be used fluently
- Type
- AuthHandler
authorize(user, handler)
Authorizes the given user against all added authorities.
Parameters:
| Name | Type | Description |
|---|---|---|
user |
User | a user. |
handler |
function | the handler for the result. |
- Source:
handle(event)
Something has happened, so handle it.
Parameters:
| Name | Type | Description |
|---|---|---|
event |
RoutingContext | the event to handle |
- Source:
parseCredentials(context, handler)
Parses the credentials from the request into a JsonObject. The implementation should
be able to extract the required info for the auth provider in the format the provider
expects.
Parameters:
| Name | Type | Description |
|---|---|---|
context |
RoutingContext | the routing context |
handler |
function | the handler to be called once the information is available. |
- Source: