Generated the following references: - `entities` - `file` - `fulfillment` - `inventory` - `js_client` - `medusa` - `medusa_config` - `medusa_react` - `modules` - `notification` - `payment` - `price_selection` - `pricing` - `product` - `search` - `services` - `stock_location` - `tax` - `tax_calculation` - `types` - `workflows` Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
44 lines
1.9 KiB
Plaintext
44 lines
1.9 KiB
Plaintext
---
|
|
displayed_sidebar: servicesSidebar
|
|
---
|
|
|
|
import ParameterTypes from "@site/src/components/ParameterTypes"
|
|
|
|
# TokenService
|
|
|
|
## constructor
|
|
|
|
### Parameters
|
|
|
|
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new TokenService"/>
|
|
|
|
___
|
|
|
|
## Properties
|
|
|
|
<ParameterTypes parameters={[{"name":"RESOLUTION_KEY","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"configModule_","type":"[ConfigModule](../../medusa/interfaces/medusa.ConfigModule-1.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="TokenService"/>
|
|
|
|
___
|
|
|
|
## Methods
|
|
|
|
### verifyToken
|
|
|
|
#### 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":[]}]} sectionTitle="verifyToken"/>
|
|
|
|
#### Returns
|
|
|
|
<ParameterTypes parameters={[{"name":"string \\| Jwt \\| JwtPayload","type":"`string` \\| `Jwt` \\| `JwtPayload`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="verifyToken"/>
|
|
|
|
### signToken
|
|
|
|
#### Parameters
|
|
|
|
<ParameterTypes parameters={[{"name":"data","type":"`string` \\| `object` \\| `Buffer`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`SignOptions`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="signToken"/>
|
|
|
|
#### Returns
|
|
|
|
<ParameterTypes parameters={[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="signToken"/>
|