chore(oas): Fix OAS related to JWT authentication (#5448)
* chore(oas): Fix OAS related to JWT authentication * generate openapi spec files * remove L option in curl examples
This commit is contained in:
@@ -4,6 +4,6 @@ medusa.admin.auth.getToken({
|
||||
email: 'user@example.com',
|
||||
password: 'supersecret'
|
||||
})
|
||||
.then(({ accessToken }) => {
|
||||
console.log(accessToekn);
|
||||
.then(({ access_token }) => {
|
||||
console.log(access_token);
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/auth/token' \
|
||||
--header 'Content-Type: application/json' \
|
||||
curl -X POST '{backend_url}/admin/auth/token' \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"email": "user@example.com",
|
||||
"password": "supersecret"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
type: object
|
||||
properties:
|
||||
accessToken:
|
||||
description: Access token for subsequent authorization.
|
||||
access_token:
|
||||
description: Access token that can be used to send authenticated requests.
|
||||
type: string
|
||||
|
||||
@@ -3,24 +3,13 @@ post:
|
||||
summary: User Login (JWT)
|
||||
x-authenticated: false
|
||||
description: >-
|
||||
After a successful login, a JWT token is returned for subsequent
|
||||
authorization.
|
||||
parameters: []
|
||||
After a successful login, a JWT token is returned, which can be used to send
|
||||
authenticated requests.
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- email
|
||||
- password
|
||||
properties:
|
||||
email:
|
||||
type: string
|
||||
description: The User's email.
|
||||
password:
|
||||
type: string
|
||||
description: The User's password.
|
||||
$ref: ../components/schemas/AdminPostAuthReq.yaml
|
||||
x-codegen:
|
||||
method: getToken
|
||||
x-codeSamples:
|
||||
|
||||
Reference in New Issue
Block a user