Configuration

class Configuration : Configuration

JWT auth provider configuration

Properties

realm

var realm: String

JWT realm name that will be used during auth challenge

Inherited Properties

name

val name: String?

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

pipeline

Authentication pipeline for this provider

Functions

authHeader

fun authHeader(
    block: (ApplicationCall) -> HttpAuthHeader?
): Unit

Http auth header retrieval function. By default it does parse Authorization header content.

authSchemes

fun authSchemes(
    defaultScheme: String = "Bearer",
    vararg additionalSchemes: String
): Unit

validate

fun validate(
    validate: suspend ApplicationCall.(JWTCredential) -> Principal?
): Unit

Apply validate function to every call with JWTCredential

verifier

fun verifier(verifier: JWTVerifier): Unit
fun verifier(
    verifier: (HttpAuthHeader) -> JWTVerifier?
): Unit
fun verifier(
    jwkProvider: JwkProvider,
    issuer: String,
    configure: JWTConfigureFunction = {}
): Unit
fun verifier(
    jwkProvider: JwkProvider,
    configure: JWTConfigureFunction = {}
): Unit

Inherited Functions

skipWhen

fun skipWhen(predicate: (ApplicationCall) -> Boolean): Unit

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