Cell API
Docs
GitHub
Preparing search index...
@celljs/jwt
JwtService
Interface JwtService
interface
JwtService
{
decode
(
token
:
string
,
options
?:
DecodeOptions
,
)
:
Promise
<
string
|
JwtPayload
|
undefined
>
;
sign
(
payload
:
string
|
object
|
Buffer
<
ArrayBufferLike
>
,
options
?:
SignOptions
,
privateKey
?:
Secret
,
)
:
Promise
<
string
>
;
verify
<
T
extends
object
=
any
>
(
token
:
string
,
options
?:
VerifyOptions
,
publicKey
?:
string
|
Buffer
<
ArrayBufferLike
>
,
)
:
Promise
<
T
>
;
}
Implemented by
JwtServiceImpl
Index
Methods
decode
sign
verify
Methods
decode
decode
(
token
:
string
,
options
?:
DecodeOptions
,
)
:
Promise
<
string
|
JwtPayload
|
undefined
>
Parameters
token
:
string
Optional
options
:
DecodeOptions
Returns
Promise
<
string
|
JwtPayload
|
undefined
>
sign
sign
(
payload
:
string
|
object
|
Buffer
<
ArrayBufferLike
>
,
options
?:
SignOptions
,
privateKey
?:
Secret
,
)
:
Promise
<
string
>
Parameters
payload
:
string
|
object
|
Buffer
<
ArrayBufferLike
>
Optional
options
:
SignOptions
Optional
privateKey
:
Secret
Returns
Promise
<
string
>
verify
verify
<
T
extends
object
=
any
>
(
token
:
string
,
options
?:
VerifyOptions
,
publicKey
?:
string
|
Buffer
<
ArrayBufferLike
>
,
)
:
Promise
<
T
>
Type Parameters
T
extends
object
=
any
Parameters
token
:
string
Optional
options
:
VerifyOptions
Optional
publicKey
:
string
|
Buffer
<
ArrayBufferLike
>
Returns
Promise
<
T
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Methods
decode
sign
verify
Docs
GitHub
Cell API
Loading...