docs: updates following authentication flow changes (#8706)
* docs: updates following authentication flow changes * generate sidebar * added open api specs * fix up OAS * changes to existing pages * change sidebar items * update marketplace recipe
This commit is contained in:
73
www/apps/api-reference/specs/admin/paths/auth_session.yaml
Normal file
73
www/apps/api-reference/specs/admin/paths/auth_session.yaml
Normal file
@@ -0,0 +1,73 @@
|
||||
post:
|
||||
operationId: PostSession
|
||||
summary: Set Authentication Session
|
||||
description: >-
|
||||
Set the cookie session ID of an admin user. The admin must be previously
|
||||
authenticated with the `/auth/user/{provider}` API route first, as the JWT
|
||||
token is required in the header of the request.
|
||||
x-authenticated: true
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/auth_session/post.sh
|
||||
tags:
|
||||
- Auth
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/AuthAdminSessionResponse.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
delete:
|
||||
operationId: DeleteSession
|
||||
summary: Delete Authentication Session
|
||||
description: Deletes the cookie session ID previously set for authentication.
|
||||
x-authenticated: true
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/auth_session/delete.sh
|
||||
tags:
|
||||
- Auth
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
description: SUMMARY
|
||||
required:
|
||||
- success
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
title: success
|
||||
description: Whether the session was deleted successfully.
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
@@ -0,0 +1,41 @@
|
||||
post:
|
||||
operationId: PostActor_typeAuth_provider
|
||||
summary: Authenticate User
|
||||
description: >-
|
||||
Authenticate an admin user and receive the JWT token to be used in the
|
||||
header of subsequent requests.
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
- name: auth_provider
|
||||
in: path
|
||||
description: The provider used for authentication.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: emailpass
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/auth_user_{auth_provider}/post.sh
|
||||
tags:
|
||||
- Auth
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/AuthResponse.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
@@ -0,0 +1,43 @@
|
||||
post:
|
||||
operationId: PostActor_typeAuth_providerCallback
|
||||
summary: Validate Authentication Callback
|
||||
description: >-
|
||||
Third-party authentication providers, such as Google, require an API route
|
||||
to call once authentication with the third-party provider is finished. This
|
||||
API route validates callback for admin users logged-in with third-party
|
||||
providers.
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
- name: auth_provider
|
||||
in: path
|
||||
description: The provider used for authentication.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: google
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/auth_user_{auth_provider}_callback/post.sh
|
||||
tags:
|
||||
- Auth
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/AuthResponse.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
@@ -0,0 +1,42 @@
|
||||
post:
|
||||
operationId: PostActor_typeAuth_provider_register
|
||||
summary: Retrieve Registration JWT Token
|
||||
description: >-
|
||||
A registration JWT token is used in the header of requests that create a
|
||||
user, such as the accept invitation request. This API route retrieves the
|
||||
JWT token of a user that hasn't been registered yet.
|
||||
x-authenticated: false
|
||||
parameters:
|
||||
- name: auth_provider
|
||||
in: path
|
||||
description: The provider used for authentication.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: emailpass
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/auth_user_{auth_provider}_register/post.sh
|
||||
tags:
|
||||
- Auth
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/AuthResponse.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
Reference in New Issue
Block a user