vertx / io.vertx.ext.web.handler / RedirectAuthHandler

RedirectAuthHandler

interface RedirectAuthHandler : AuthHandler

An auth handler that's used to handle auth by redirecting user to a custom login page.

Author
Tim Fox

Properties

DEFAULT_LOGIN_REDIRECT_URL

static val DEFAULT_LOGIN_REDIRECT_URL: String

Default path the user will be redirected to

DEFAULT_RETURN_URL_PARAM

static val DEFAULT_RETURN_URL_PARAM: String

Default name of param used to store return url information in session

Functions

create

open static fun create(authProvider: AuthProvider): AuthHandler
open static fun create(authProvider: AuthProvider, loginRedirectURL: String): AuthHandler
open static fun create(authProvider: AuthProvider, loginRedirectURL: String, returnURLParam: String): AuthHandler

Create a handler

Inherited 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.