vertx / io.vertx.ext.web.handler / AuthHandler

# AuthHandler

`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

### Functions

addAuthorities | `abstract fun addAuthorities(authorities: MutableSet<String>): AuthHandler` Add a set of required authorities for this auth handler
addAuthority | `abstract fun addAuthority(authority: String): AuthHandler` Add a required authority for this auth handler
authorize | `abstract fun authorize(user: User, handler: Handler<AsyncResult<Void>>): Unit` Authorizes the given user against all added authorities.
parseCredentials | `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.

### Inheritors

BasicAuthHandler | `interface BasicAuthHandler : AuthHandler` An auth handler that provides HTTP Basic Authentication support.
ChainAuthHandler | `interface ChainAuthHandler : AuthHandler` An auth handler that chains to a sequence of handlers.
DigestAuthHandler | `interface DigestAuthHandler : AuthHandler` An auth handler that provides HTTP Basic Authentication support.
JWTAuthHandler | `interface JWTAuthHandler : AuthHandler` An auth handler that provides JWT Authentication support.
OAuth2AuthHandler | `interface OAuth2AuthHandler : AuthHandler` An auth handler that provides OAuth2 Authentication support. This handler is suitable for AuthCode flows.
RedirectAuthHandler | `interface RedirectAuthHandler : AuthHandler` An auth handler that's used to handle auth by redirecting user to a custom login page.