Config

A configuration for the jwt authentication provider.

Properties

Link copied to clipboard
val name: String?
Link copied to clipboard

Specifies a JWT realm to be passed in WWW-Authenticate header.

Functions

Link copied to clipboard

Retrieves an HTTP authentication header. By default, it parses the Authorization header content.

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

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

Allows you to perform additional validations on the JWT payload.

Link copied to clipboard
fun verifier(verifier: JWTVerifier)
fun verifier(verifier: (HttpAuthHeader) -> JWTVerifier?)
fun verifier(jwkProvider: JwkProvider, configure: JWTConfigureFunction = {})
fun verifier(issuer: String, block: JWTConfigureFunction = {})
fun verifier(jwkProvider: JwkProvider, issuer: String, configure: JWTConfigureFunction = {})
fun verifier(issuer: String, audience: String, algorithm: Algorithm, block: Verification.() -> Unit = {})

Provides a JWTVerifier used to verify a token format and signature.