Files
medusa-store/www/apps/docs/content/references/services/classes/services.TokenService.mdx
Shahed Nasser 892d737c1f docs: enhance how references are generated (#5805)
* adjusted configurations

* enhancements to tool and configurations

* change reference in docs

* fixed issue in workflows reference

* added project name

* more optimizations

* fix context error

* added a types reference

* resolved missing types

* fix reference reflection types not having children

* add an expand url parameter

* added new option to the README

* added details about new option
2023-12-05 15:29:41 +02:00

133 lines
2.2 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": []
}
]} />
___
## Properties
<ParameterTypes parameters={[
{
"name": "configModule_",
"type": "[ConfigModule](../../medusa/types/medusa.ConfigModule-1.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "RESOLUTION_KEY",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
### 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": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "string",
"type": "`string`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
### 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": []
}
]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "string \\| Jwt \\| JwtPayload",
"type": "`string` \\| `Jwt` \\| `JwtPayload`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />