JwtConfig
Configuration for the jwt strategy factory.
Configures JWT bearer-token authentication. decoder and keySource are required; other settings have defaults. Leave identityMapper unset to get the default Jwt identity, or set it to map verified tokens to your own domain identity. Roles always come from rolesMapper and land on io.github.mzlnk.javalin.security.authentication.Authentication.roles. Builds a JwtVerification and JwtAuthenticator for the returned strategy, and selects a BearerChallengeUnauthorizedHandler when bearerChallenge is true. Does not configure authorization rules — set those via security.rules.
Properties
When true, failed or absent authentication includes a WWW-Authenticate: Bearer header with the 401 response.
Maximum acceptable clock skew in seconds for exp and nbf validation.
The JwtDecoder used to verify and decode bearer tokens. Required.
Handler for access denied to an authenticated caller.
Maps a verified DecodedJwt to your own io.github.mzlnk.javalin.security.authentication.Identity, replacing the default Jwt wrapper.
Where verification keys come from (local public key, PEM, HMAC secret, or JWKS). Required.
Realm attribute included in the WWW-Authenticate header when bearerChallenge is true.
Maps a verified DecodedJwt to the caller's io.javalin.security.RouteRoles.
Locates the raw token in the incoming request.