verifier

fun verifier(verifier: JWTVerifier)(source)

Sets the JWTVerifier used to verify token format and signature.

Report a problem

Parameters

verifier

verifies token format and signature.


fun verifier(verifier: suspend (HttpAuthHeader) -> JWTVerifier?)(source)

Sets a suspend function that selects the JWTVerifier for a token.

Return null when no verifier can be created for the provided header.

Report a problem

Parameters

verifier

resolves a verifier for the authentication header.


fun verifier(jwkProvider: JwkProvider, issuer: String, configure: JWTConfigureFunction = {})(source)

Creates a JWTVerifier from jwkProvider and issuer.

Report a problem

Parameters

jwkProvider

provides JSON Web Keys.

issuer

expected token issuer.

configure

configures JWT verification.


fun verifier(jwkProvider: JwkProvider, configure: JWTConfigureFunction = {})(source)

Creates a JWTVerifier from jwkProvider.

Report a problem

Parameters

jwkProvider

provides JSON Web Keys.

configure

configures JWT verification.


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

Creates a JWTVerifier for the given issuer, audience, and algorithm.

Report a problem

Parameters

issuer

expected token issuer.

audience

expected token audience.

algorithm

algorithm used to verify token signatures.

block

customizes the underlying JWT verification.


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

Creates a JWTVerifier using JSON Web Keys discovered from issuer.

Report a problem

Parameters

issuer

expected token issuer and JWK provider base URL.

block

configures JWT verification.