Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- paths:
- /auth/token:
- get:
- tags:
- - Auth
- summary: Verify a 3rd party auth code and return an access token
- parameters:
- - in: query
- name: provider
- schema:
- type: string
- required: true
- description: The name of the 3rd party provider
- - in: query
- name: code
- schema:
- type: string
- required: true
- description: The code of the 3rd party provider to verify
- responses:
- 200:
- description: The code was valid and we found/created a user
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AuthTokenResponse'
- 400:
- description: An error occured during verification
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SimpleMessageResponse'
- post:
- tags:
- - Auth
- summary: Verify a user's credentials and return an access token
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- username:
- type: string
- password:
- type: string
- responses:
- 200:
- description: The credentials are valid
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AuthTokenResponse'
- 400:
- description: An error occured during verification
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SimpleMessageResponse'
- delete:
- tags:
- - Auth
- summary: Remove a user's token, A.K.A. sign out
- security:
- - Bearer: []
- responses:
- 200:
- description: Successful sign out
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SimpleMessageResponse'
Advertisement
Add Comment
Please, Sign In to add comment