1 /**
2 * @oas [post] /auth/session
3 * operationId: PostSession
4 * summary: Set Authentication Session
5 * description: Set the cookie session ID of a customer. The customer must be previously authenticated with the `/auth/customer/{provider}` API route first,
6 * as the JWT token is required in the header of the request.
7 * externalDocs:
8 * url: https://docs.medusajs.com/resources/storefront-development/customers/login#2-using-a-cookie-session
9 * description: "Storefront development: How to login as a customer"
10 * x-authenticated: true
11 * x-codeSamples:
12 * - lang: Shell
13 * label: cURL
14 * source: |-
15 * curl -X POST '{backend_url}/auth/session' \
16 * -H 'Authorization: Bearer {jwt_token}'
17 * tags:
18 * - Auth
19 * responses:
20 * "200":
21 * description: OK
22 * content:
23 * application/json:
24 * schema:
25 * $ref: "#/components/schemas/AuthStoreSessionResponse"
26 * "400":
27 * $ref: "#/components/responses/400_error"
28 * "401":
29 * $ref: "#/components/responses/unauthorized"
30 * "404":
31 * $ref: "#/components/responses/not_found_error"
32 * "409":
33 * $ref: "#/components/responses/invalid_state_error"
34 * "422":
35 * $ref: "#/components/responses/invalid_request_error"
36 * "500":
37 * $ref: "#/components/responses/500_error"
38 *
39 */
40