Configuration

class Configuration<T : Any> : AuthenticationProvider.Configuration

Session auth configuration

Functions

Link copied to clipboard
fun challenge(redirect: Url)
fun challenge(redirectUrl: String)
fun challenge(block: SessionAuthChallengeFunction<T>)

A response to send back if authentication failed

Link copied to clipboard
fun skipWhen(predicate: (ApplicationCall) -> Boolean)

Adds an authentication filter to the list. For every application call the specified predicate is applied and if it returns true then the authentication provider is skipped (no auth required for this call with this provider).

Link copied to clipboard
fun validate(block: suspend ApplicationCall.(T) -> Principal?)

Sets a validation function that will check given T session instance and return Principal, or null if the session does not correspond to an authenticated principal

Properties

Link copied to clipboard
var challenge: SessionAuthChallenge<T>

A response to send back if authentication failed

Link copied to clipboard
val name: String?

is the name of the provider, or null for a default provider.

Link copied to clipboard
val pipeline: AuthenticationPipeline

Authentication pipeline for this provider.