61 lines
1.4 KiB
YAML
61 lines
1.4 KiB
YAML
post:
|
|
operationId: PostAuth
|
|
summary: Authenticate Customer
|
|
description: >-
|
|
Logs a Customer in and authorizes them to view their details. Successful
|
|
authentication will set a session cookie in the Customer's browser.
|
|
parameters: []
|
|
tags:
|
|
- Auth
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
customer:
|
|
$ref: ../components/schemas/customer.yaml
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required:
|
|
- email
|
|
- password
|
|
properties:
|
|
email:
|
|
type: string
|
|
description: The Customer's email.
|
|
password:
|
|
type: string
|
|
description: The Customer's password.
|
|
delete:
|
|
operationId: DeleteAuth
|
|
summary: Log out
|
|
description: Destroys a Customer's authenticated session.
|
|
tags:
|
|
- Auth
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
get:
|
|
operationId: GetAuth
|
|
summary: Get Session
|
|
description: Gets the currently logged in Customer.
|
|
x-authenticated: true
|
|
tags:
|
|
- Auth
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
customer:
|
|
$ref: ../components/schemas/customer.yaml
|
|
'401':
|
|
description: Unauthorized
|