Config

class Config : AuthenticationProvider.Config

A configuration for the form-based authentication provider.

Functions

Link copied to clipboard
fun challenge(redirect: Url)
fun challenge(redirectUrl: String)

Specifies a redirect URL in a case of failed authentication.

fun challenge(function: FormAuthChallengeFunction)

Specifies a response sent to the client if authentication fails.

Link copied to clipboard
fun skipWhen(predicate: (<ERROR CLASS>) -> 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(body: suspend <ERROR CLASS>.(UserPasswordCredential) -> Principal?)

Sets a validation function that checks a specified UserPasswordCredential instance and returns UserIdPrincipal in a case of successful authentication or null if authentication fails.

Properties

Link copied to clipboard
val name: String?

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

Link copied to clipboard
var passwordParamName: String

Specifies a POST parameter name used to fetch a password.

Link copied to clipboard
var userParamName: String

Specifies a POST parameter name used to fetch a username.