AuthenticationContext

An authentication context for a call.

Parameters

call

instance of ApplicationCall this context is for.

Constructors

Link copied to clipboard

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Requests a challenge to be sent to the client if none of mechanisms can authenticate a user.

Link copied to clipboard

Appends an error to the errors list. Overwrites if already registered for the same key.

Link copied to clipboard
fun principal(principal: Principal)

Sets an authenticated principal for this context.

inline fun <T : Principal> principal(provider: String? = null): T?

Retrieves a principal of the type T from provider with name provider, if any.

fun principal(provider: String? = null, principal: Principal)

Sets an authenticated principal for this context from provider with name provider.

fun <T : Principal> principal(provider: String?, klass: KClass<T>): T?

Retrieves a principal of the type T, if any.

Properties

Link copied to clipboard

All registered errors during auth procedure (only AuthenticationFailedCause.Error).

Link copied to clipboard

All authentication failures during auth procedure including missing or invalid credentials.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Stores authentication failures for keys provided by authentication mechanisms.

Link copied to clipboard

Retrieves an authenticated principal, or returns null if a user isn't authenticated.