interface AuthHandler : Handler<RoutingContext>
Base interface for auth handlers.
An auth handler allows your application to provide authentication/authorisation support.
Auth handler requires a SessionHandler to be on the routing chain before it.
Author
Tim Fox
Author
Paulo Lopes
abstract fun addAuthorities(authorities: MutableSet<String>): AuthHandler
Add a set of required authorities for this auth handler |
|
abstract fun addAuthority(authority: String): AuthHandler
Add a required authority for this auth handler |
|
abstract fun authorize(user: User, handler: Handler<AsyncResult<Void>>): Unit
Authorizes the given user against all added authorities. |
|
abstract fun parseCredentials(context: RoutingContext, handler: Handler<AsyncResult<JsonObject>>): Unit
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. |
interface BasicAuthHandler : AuthHandler
An auth handler that provides HTTP Basic Authentication support. |
|
interface ChainAuthHandler : AuthHandler
An auth handler that chains to a sequence of handlers. |
|
interface DigestAuthHandler : AuthHandler
An auth handler that provides HTTP Basic Authentication support. |
|
interface JWTAuthHandler : AuthHandler
An auth handler that provides JWT Authentication support. |
|
interface OAuth2AuthHandler : AuthHandler
An auth handler that provides OAuth2 Authentication support. This handler is suitable for AuthCode flows. |
|
interface RedirectAuthHandler : AuthHandler
An auth handler that's used to handle auth by redirecting user to a custom login page. |