vertx / io.vertx.reactivex.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 io.vertx.reactivex.ext.web.handler.SessionHandler to be on the routing chain before it.

NOTE: This class has been automatically generated from the io.vertx.ext.web.handler.AuthHandler non RX-ified interface using Vert.x codegen.

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.

getDelegate

abstract fun getDelegate(): AuthHandler

handle

abstract fun handle(arg0: RoutingContext): Unit

newInstance

open static fun newInstance(arg: AuthHandler): AuthHandler

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

open class BasicAuthHandler : AuthHandler, Handler<RoutingContext>

An auth handler that provides HTTP Basic Authentication support. NOTE: This class has been automatically generated from the io.vertx.ext.web.handler.BasicAuthHandler non RX-ified interface using Vert.x codegen.

ChainAuthHandler

open class ChainAuthHandler : AuthHandler, Handler<RoutingContext>

An auth handler that chains to a sequence of handlers. NOTE: This class has been automatically generated from the io.vertx.ext.web.handler.ChainAuthHandler non RX-ified interface using Vert.x codegen.

DigestAuthHandler

open class DigestAuthHandler : AuthHandler, Handler<RoutingContext>

An auth handler that provides HTTP Basic Authentication support. NOTE: This class has been automatically generated from the io.vertx.ext.web.handler.DigestAuthHandler non RX-ified interface using Vert.x codegen.

JWTAuthHandler

open class JWTAuthHandler : AuthHandler, Handler<RoutingContext>

An auth handler that provides JWT Authentication support. NOTE: This class has been automatically generated from the io.vertx.ext.web.handler.JWTAuthHandler non RX-ified interface using Vert.x codegen.

OAuth2AuthHandler

open class OAuth2AuthHandler : AuthHandler, Handler<RoutingContext>

An auth handler that provides OAuth2 Authentication support. This handler is suitable for AuthCode flows. NOTE: This class has been automatically generated from the io.vertx.ext.web.handler.OAuth2AuthHandler non RX-ified interface using Vert.x codegen.

RedirectAuthHandler

open class RedirectAuthHandler : AuthHandler, Handler<RoutingContext>

An auth handler that's used to handle auth by redirecting user to a custom login page. NOTE: This class has been automatically generated from the io.vertx.ext.web.handler.RedirectAuthHandler non RX-ified interface using Vert.x codegen.