Type Alias: JwtOptions
JwtOptions =
object
Defined in: http-server-auth/src/types.ts:11
Properties
mapPayload?
optionalmapPayload?: (payload,ctx) =>AuthenticatedUser|null
Defined in: http-server-auth/src/types.ts:20
Override how the JWT payload maps to an AuthenticatedUser.
Defaults to { id: payload.sub, email: payload.email }.
Receives the Koa ctx as a second argument so the mapping can do
request-scoped work (e.g. reading from ctx.db).
Parameters
| Parameter | Type |
|---|---|
payload | Record<string, unknown> |
ctx | Context |
Returns
AuthenticatedUser | null
secret
secret:
string
Defined in: http-server-auth/src/types.ts:12