Generated the following references: - `entities` - `inventory` - `js-client` - `pricing` - `product` - `services` - `stock-location` - `workflows` Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
141 lines
2.4 KiB
Plaintext
141 lines
2.4 KiB
Plaintext
---
|
|
displayed_sidebar: servicesSidebar
|
|
---
|
|
|
|
import ParameterTypes from "@site/src/components/ParameterTypes"
|
|
|
|
# TokenService
|
|
|
|
## Constructors
|
|
|
|
#### constructor
|
|
|
|
`**new TokenService**(«destructured»)`
|
|
|
|
##### Parameters
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "__namedParameters",
|
|
"type": "[InjectedDependencies](../types/InjectedDependencies-41.mdx)",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
## Properties
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "configModule_",
|
|
"type": "[ConfigModule](../types/ConfigModule.mdx)",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "RESOLUTION_KEY",
|
|
"type": "`string`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
## Methods
|
|
|
|
#### signToken
|
|
|
|
`**signToken**(data, options?): string`
|
|
|
|
##### Parameters
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "data",
|
|
"type": "`string` \\| `object` \\| [Buffer](../index.md#buffer)",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "options",
|
|
"type": "`SignOptions`",
|
|
"description": "",
|
|
"optional": true,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
##### Returns
|
|
|
|
`string`
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "string",
|
|
"type": "`string`",
|
|
"optional": true,
|
|
"defaultValue": "",
|
|
"description": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
___
|
|
|
|
#### verifyToken
|
|
|
|
`**verifyToken**(token, options?): string \| Jwt \| JwtPayload`
|
|
|
|
##### Parameters
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "token",
|
|
"type": "`string`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "options",
|
|
"type": "`VerifyOptions`",
|
|
"description": "",
|
|
"optional": true,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
##### Returns
|
|
|
|
`string` \| `Jwt` \| `JwtPayload`
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "string \\| Jwt \\| JwtPayload",
|
|
"type": "`string` \\| `Jwt` \\| `JwtPayload`",
|
|
"optional": true,
|
|
"defaultValue": "",
|
|
"description": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|