JwtDecodeOptions

zio.blocks.jwt.JwtDecodeOptions
See theJwtDecodeOptions companion object
final case class JwtDecodeOptions(clockSkewSeconds: Long = ..., issuer: Option[String] = ..., expectedAudience: Option[String] = ..., backend: Option[JwtCryptoBackend] = ..., nowSeconds: Option[Long] = ..., limits: JwtLimits = ...)

Options for authenticated JWT decoding.

This is the source-compatible configuration value that groups optional parameters instead of adding many positional arguments. Existing call sites that use decode(token,key,alg,clockSkew,issuer) continue to work via the legacy overload which delegates to this options type.

Audience validation follows RFC 7519 ยง4.1.3 receiver contract: when expectedAudience is set, the token's aud claim must be present and contain the expected value (string match for single aud, membership for array aud). Missing aud yields MissingClaim("aud"); mismatch yields InvalidToken.

Value parameters

backend

explicit crypto backend to use for this operation; defaults to JwtCrypto.backend snapshot

clockSkewSeconds

allowable clock skew in seconds for exp/nbf validation

expectedAudience

if set, the aud claim must contain this audience

issuer

if set, the iss claim must match exactly

limits

resource limits for token/JSON parsing

nowSeconds

explicit current time in seconds since epoch for exp/nbf validation; defaults to System.currentTimeMillis()/1000

Attributes

Companion
object
Source
Jwt.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala