The name to be used for accessing the JWT functionality in the Elysia context
Optional ReadonlyexpJWT expiration setting. Applies as the default expiration for tokens.
Controls how long tokens are valid before they expire. This setting provides a good balance between security (limiting the window of opportunity for token misuse) and user experience (not requiring frequent re-authentication).
Optional ReadonlyheaderDefault JWT header parameters to include in every JWT.
This allows you to specify additional metadata about the token.
Optional ReadonlyjwtJWT name to add in context with decorate.
This allows you to customize how you access the JWT functionality in your
route handlers. For example, if set to 'auth', you would use auth.sign()
instead of the default jwt.sign().
Optional ReadonlypayloadDefault payload values to include in every JWT.
These values are merged with any additional payload provided during signing, allowing you to set standard claims that should be included in all tokens generated by your application.
ReadonlysecretSecret key used to sign and verify JWTs.
Configuration options for the JWT plugin.
Example