Search
Preparing search index...
The search index is not available
supertokens-node
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
supertokens-node
recipe/jwt
Module recipe/jwt
Index
Classes
default
Type Aliases
APIInterface
APIOptions
Json
Web
Key
Recipe
Interface
Functions
createJWT
getJWKS
init
Type Aliases
APIInterface
APIInterface
:
{
getJWKSGET
:
undefined
|
(
(
input
:
{
options
:
APIOptions
;
userContext
:
UserContext
}
)
=>
Promise
<
{
keys
:
JsonWebKey
[]
}
|
GeneralErrorResponse
>
)
}
Type declaration
getJWKSGET
:
undefined
|
(
(
input
:
{
options
:
APIOptions
;
userContext
:
UserContext
}
)
=>
Promise
<
{
keys
:
JsonWebKey
[]
}
|
GeneralErrorResponse
>
)
APIOptions
APIOptions
:
{
config
:
TypeNormalisedInput
;
isInServerlessEnv
:
boolean
;
recipeId
:
string
;
recipeImplementation
:
RecipeInterface
;
req
:
BaseRequest
;
res
:
BaseResponse
}
Type declaration
config
:
TypeNormalisedInput
is
In
Serverless
Env
:
boolean
recipe
Id
:
string
recipe
Implementation
:
RecipeInterface
req
:
BaseRequest
res
:
BaseResponse
Json
Web
Key
Json
Web
Key
:
{
alg
:
string
;
e
:
string
;
kid
:
string
;
kty
:
string
;
n
:
string
;
use
:
string
}
Type declaration
alg
:
string
e
:
string
kid
:
string
kty
:
string
n
:
string
use
:
string
Recipe
Interface
Recipe
Interface
:
{
createJWT
:
any
;
getJWKS
:
any
}
Type declaration
createJWT
:
function
createJWT
(
input
:
{
payload
?:
any
;
useStaticSigningKey
?:
boolean
;
userContext
:
UserContext
;
validitySeconds
?:
number
}
)
:
Promise
<
{
jwt
:
string
;
status
:
"OK"
}
|
{
status
:
"UNSUPPORTED_ALGORITHM_ERROR"
}
>
Parameters
input:
{
payload
?:
any
;
useStaticSigningKey
?:
boolean
;
userContext
:
UserContext
;
validitySeconds
?:
number
}
Optional
payload
?:
any
Optional
use
Static
Signing
Key
?:
boolean
user
Context
:
UserContext
Optional
validity
Seconds
?:
number
Returns
Promise
<
{
jwt
:
string
;
status
:
"OK"
}
|
{
status
:
"UNSUPPORTED_ALGORITHM_ERROR"
}
>
getJWKS
:
function
getJWKS
(
input
:
{
userContext
:
UserContext
}
)
:
Promise
<
{
keys
:
JsonWebKey
[]
;
validityInSeconds
?:
number
}
>
Parameters
input:
{
userContext
:
UserContext
}
user
Context
:
UserContext
Returns
Promise
<
{
keys
:
JsonWebKey
[]
;
validityInSeconds
?:
number
}
>
Functions
createJWT
createJWT
(
payload
:
any
, validitySeconds
?:
number
, useStaticSigningKey
?:
boolean
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
jwt
:
string
;
status
:
"OK"
}
|
{
status
:
"UNSUPPORTED_ALGORITHM_ERROR"
}
>
Parameters
payload:
any
Optional
validitySeconds:
number
Optional
useStaticSigningKey:
boolean
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
jwt
:
string
;
status
:
"OK"
}
|
{
status
:
"UNSUPPORTED_ALGORITHM_ERROR"
}
>
getJWKS
getJWKS
(
userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
keys
:
JsonWebKey
[]
;
validityInSeconds
?:
number
}
>
Parameters
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
keys
:
JsonWebKey
[]
;
validityInSeconds
?:
number
}
>
init
init
(
config
?:
TypeInput
)
:
RecipeListFunction
Parameters
Optional
config:
TypeInput
Returns
RecipeListFunction
Modules
framework
framework/aws
Lambda
framework/custom
framework/express
framework/fastify
framework/hapi
framework/koa
framework/loopback
index
ingredients/emaildelivery
ingredients/smsdelivery
recipe/accountlinking
recipe/dashboard
recipe/emailpassword
recipe/emailverification
recipe/jwt
recipe/multifactorauth
recipe/multitenancy
recipe/oauth2provider
recipe/openid
recipe/passwordless
recipe/session
recipe/thirdparty
recipe/totp
recipe/usermetadata
recipe/userroles
default
APIInterface
APIOptions
Json
Web
Key
Recipe
Interface
createJWT
getJWKS
init
Generated using
TypeDoc