VerifyOptions class
Options for JWT claim verification.
All flags default to true — disable them only when you need to skip a
specific check (e.g. exp: false for tokens that must not expire).
app.mount('/api/*', jwt(
secret: env.secret,
verifyOptions: VerifyOptions(iss: 'my-app', nbf: true, exp: true, iat: true),
));
Constructors
- VerifyOptions({String? iss, bool exp = true, bool nbf = true, bool iat = true})
-
const
Properties
- exp → bool
-
Validate the
exp(expiration) claim when present. Defaults totrue.final - hashCode → int
-
The hash code for this object.
no setterinherited
- iat → bool
-
Validate that
iat(issued-at) is not set in the future. Defaults totrue.final - iss → String?
-
Expected
iss(issuer) claim value. Skipped whennull.final - nbf → bool
-
Validate the
nbf(not-before) claim when present. Defaults totrue.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited