@envoy/envoy-integrations-sdk / EnvoyJWT
Helper to encode and decode JWTs.
• new EnvoyJWT(secret?, algorithm?)
| Name | Type | Default value |
|---|---|---|
secret |
string |
undefined |
algorithm |
Algorithm |
'HS256' |
▸ decode(token, options?): Record<string, unknown>
| Name | Type |
|---|---|
token |
string |
options |
VerifyOptions |
Record<string, unknown>
▸ encode(subject, expiresIn, payload?): string
| Name | Type |
|---|---|
subject |
null | string | number |
expiresIn |
null | string | number |
payload |
Record<string, unknown> |
string