Configuration

class Configuration : AuthenticationProvider.Configuration

JWT auth provider configuration

Functions

Link copied to clipboard
fun authHeader(block: (ApplicationCall) -> HttpAuthHeader?)

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

Link copied to clipboard
fun authSchemes(defaultScheme: String = "Bearer", vararg additionalSchemes: String)
Link copied to clipboard
fun challenge(block: JWTAuthChallengeFunction)

Specifies what to send back if jwt authentication fails.

Link copied to clipboard
fun skipWhen(predicate: (ApplicationCall) -> Boolean)
Link copied to clipboard
fun validate(validate: suspend ApplicationCall.(JWTCredential) -> Principal?)

Apply validate function to every call with JWTCredential

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

fun verifier(issuer: String, block: JWTConfigureFunction = {})

Configure verifier using JwkProvider.

fun verifier(issuer: String, audience: String, algorithm: Algorithm, block: Verification.() -> Unit = {})

Configure verifier using JWTVerifier.

Properties

Link copied to clipboard
val name: String?
Link copied to clipboard
val pipeline: AuthenticationPipeline
Link copied to clipboard
var realm: String

JWT realm name that will be used during auth challenge