fast-jwt
This is the doc comment for file1.ts
Specify this is a module comment and rename it to my-module:
Classes​
Other Functions​
Primary API Functions​
Interfaces​
Type aliases​
Algorithm​
Ƭ Algorithm: "none"
| "HS256"
| "HS384"
| "HS512"
| "ES256"
| "ES384"
| "ES512"
| "RS256"
| "RS384"
| "RS512"
| "PS256"
| "PS384"
| "PS512"
| "EdDSA"
SignerCallback​
Ƭ SignerCallback: (e
: Error
| TokenError
| null
, token
: string
) => void
Type declaration​
â–¸ (e
, token
): void
Parameters​
Name | Type |
---|---|
e | Error | TokenError | null |
token | string |
Returns​
void
VerifierCallback​
Ƭ VerifierCallback: (e
: Error
| TokenError
| null
, payload
: any
) => void
Type declaration​
â–¸ (e
, payload
): void
Parameters​
Name | Type |
---|---|
e | Error | TokenError | null |
payload | any |
Returns​
void
KeyFetcher​
Ƭ KeyFetcher: (header
: { [key: string]: any
; }) => Promise
<string
| Buffer
> | (header
: { [key: string]: any
; }, cb
: (err
: Error
| TokenError
| null
, key
: string
| Buffer
) => void
) => void
Other Functions​
SignerSync​
â–¸ SignerSync(payload
): string
internal
Parameters​
Name | Type |
---|---|
payload | string | Buffer | { [key: string]: any ; } |
Returns​
string
SignerAsync​
â–¸ SignerAsync(payload
): Promise
<string
>
Parameters​
Name | Type |
---|---|
payload | string | Buffer | { [key: string]: any ; } |
Returns​
Promise
<string
>
â–¸ SignerAsync(payload
, cb
): void
Parameters​
Name | Type |
---|---|
payload | string | Buffer | { [key: string]: any ; } |
cb | SignerCallback |
Returns​
void
VerifierSync​
â–¸ VerifierSync(token
): any
Parameters​
Name | Type |
---|---|
token | string | Buffer |
Returns​
any
VerifierAsync​
â–¸ VerifierAsync(token
): Promise
<any
>
Parameters​
Name | Type |
---|---|
token | string | Buffer |
Returns​
Promise
<any
>
â–¸ VerifierAsync(token
, cb
): void
Parameters​
Name | Type |
---|---|
token | string | Buffer |
cb | object |
Returns​
void
Primary API Functions​
createSigner​
â–¸ createSigner(options?
): typeof SignerSync
Creates a sync version of a signer
category
Primary API
Parameters​
Name | Type | Description |
---|---|---|
options? | Partial <SignerOptions & { key : string | Buffer }> | The signer options |
Returns​
typeof SignerSync
â–¸ createSigner(options?
): typeof SignerAsync
Creates an async version of a signer
category
Primary API
Parameters​
Name | Type | Description |
---|---|---|
options? | Partial <SignerOptions & { key : KeyFetcher }> | The signer options |
Returns​
typeof SignerAsync
createDecoder​
â–¸ createDecoder(options?
): (token
: string
| Buffer
) => any
Creates a decoder
Parameters​
Name | Type | Description |
---|---|---|
options? | Partial <DecoderOptions > | The decoder options |
Returns​
fn
â–¸ (token
): any
Creates a decoder
category
Primary API
Parameters​
Name | Type |
---|---|
token | string | Buffer |
Returns​
any
createVerifier​
â–¸ createVerifier(options?
): typeof VerifierSync
Creates a synchronous verifier
category
Primary API
Parameters​
Name | Type | Description |
---|---|---|
options? | Partial <VerifierOptions & { key : string | Buffer }> | The verifier options |
Returns​
typeof VerifierSync
â–¸ createVerifier(options?
): typeof VerifierAsync
Creates an asynchronous verifier
category
Primary API
Parameters​
Name | Type | Description |
---|---|---|
options? | Partial <VerifierOptions & { key : KeyFetcher }> | The verifier options |
Returns​
typeof VerifierAsync