Files
medusa-store/docs/api/admin/paths/auth.yaml
2022-08-05 14:06:12 +02:00

63 lines
1.4 KiB
YAML

post:
operationId: PostAuth
summary: Authenticate a User
x-authenticated: false
description: Logs a User in and authorizes them to manage Store settings.
parameters: []
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.
tags:
- Auth
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
user:
$ref: ../components/schemas/user.yaml
'401':
description: The user doesn't exist or the credentials are incorrect.
delete:
operationId: DeleteAuth
summary: Delete Session
x-authenticated: true
description: Deletes the current session for the logged in user.
tags:
- Auth
responses:
'200':
description: OK
get:
operationId: GetAuth
summary: Get Session
x-authenticated: true
description: Gets the currently logged in User.
tags:
- Auth
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
user:
$ref: ../components/schemas/user.yaml
'400':
description: An error occurred.