Raw
1 post:
2 operationId: PostSession
3 summary: Set Authentication Session
4 description: >-
5 Set the cookie session ID of an admin user. The admin must be previously
6 authenticated with the `/auth/user/{provider}` API route first, as the JWT
7 token is required in the header of the request.
8 x-authenticated: true
9 x-codeSamples:
10 - lang: Shell
11 label: cURL
12 source:
13 $ref: ../code_samples/Shell/auth_session/post.sh
14 tags:
15 - Auth
16 responses:
17 '200':
18 description: OK
19 content:
20 application/json:
21 schema:
22 $ref: ../components/schemas/AuthAdminSessionResponse.yaml
23 '400':
24 $ref: ../components/responses/400_error.yaml
25 '401':
26 $ref: ../components/responses/unauthorized.yaml
27 '404':
28 $ref: ../components/responses/not_found_error.yaml
29 '409':
30 $ref: ../components/responses/invalid_state_error.yaml
31 '422':
32 $ref: ../components/responses/invalid_request_error.yaml
33 '500':
34 $ref: ../components/responses/500_error.yaml
35 delete:
36 operationId: DeleteSession
37 summary: Delete Authentication Session
38 description: Deletes the cookie session ID previously set for authentication.
39 x-authenticated: true
40 x-codeSamples:
41 - lang: JavaScript
42 label: JS SDK
43 source:
44 $ref: ../code_samples/JavaScript/auth_session/delete.js
45 - lang: Shell
46 label: cURL
47 source:
48 $ref: ../code_samples/Shell/auth_session/delete.sh
49 tags:
50 - Auth
51 responses:
52 '200':
53 description: OK
54 content:
55 application/json:
56 schema:
57 type: object
58 description: The deletion's details.
59 required:
60 - success
61 properties:
62 success:
63 type: boolean
64 title: success
65 description: Whether the session was deleted successfully.
66 '400':
67 $ref: ../components/responses/400_error.yaml
68 '401':
69 $ref: ../components/responses/unauthorized.yaml
70 '404':
71 $ref: ../components/responses/not_found_error.yaml
72 '409':
73 $ref: ../components/responses/invalid_state_error.yaml
74 '422':
75 $ref: ../components/responses/invalid_request_error.yaml
76 '500':
77 $ref: ../components/responses/500_error.yaml