.. AUTO-GENERATED FILE. DO NOT EDIT. Validate login and create session ================================= Summary ------- - **Source repository:** ``jef-systems/jef-one-backend`` - **Source SHA:** ``fc63b90deba131d1510b6789c172b240e305d07c`` - **Source run id:** ``26362659871`` - **Module:** ``One`` - **Lambda function:** ``jef-one-validate-login-and-create-session`` - **HTTP method:** ``POST`` - **Invocation mode:** ``async`` - **Package mode:** ``no-package`` - **API category:** ``One Complex No Package Async POST APIs`` - **API path:** ``/jef-one-validate-login-and-create-session`` - **Endpoint URL:** ``https://mfr670zvsh.execute-api.ap-southeast-1.amazonaws.com/prod/jef-one-validate-login-and-create-session`` - **Documentation scope:** ``lambda-complex-no-packages`` Async Confirmation Rule ----------------------- This write API is documented as an async accepted request, not final write success. Use the corresponding GET API to confirm the final state. Description ----------- Accepts a frontend-generated session\_id, records a processing session first, then asynchronously validates login and updates the same session to verified or failed. It can repair missing application\_id/entity\_id on an existing application credential by resolving the linked application/entity records. API Gateway Response -------------------- .. code-block:: json { "status_code": 202, "message": "This endpoint returns 202 when the request is accepted. The Lambda function continues processing asynchronously." } Payload Example --------------- .. code-block:: json { "session_id": "8d4e7d32-2f6f-4d13-9b8e-0f4e98ef0001", "entity_number": "1000", "application_name": "value_00", "employee_number": "10000", "password": "JefTest-10000-Q7mR" } Payload Schema -------------- .. code-block:: json { "root": { "type": "M", "required": true, "attributes": { "session_id": { "type": "S", "required": true, "regex": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }, "entity_number": { "type": "S", "required": true, "regex": "^[0-9]{4}$" }, "application_name": { "type": "S", "required": true, "regex": "^[A-Za-z0-9 .,'_-]{1,120}$" }, "employee_number": { "type": "S", "required": true, "regex": "^[0-9]{5}$" }, "password": { "type": "S", "required": true, "regex": "^.{1,120}$" } } } } Response Schema --------------- .. code-block:: json { "root": { "type": "M", "required": true, "attributes": { "is_accepted": { "type": "BOOL", "required": true }, "is_valid": { "type": "BOOL", "required": true }, "session_saved": { "type": "BOOL", "required": true }, "message": { "type": "S", "required": true }, "operation": { "type": "S", "required": true }, "status_code": { "type": "N", "required": true }, "entity_number": { "type": "S", "required": false }, "application_name": { "type": "S", "required": false }, "employee_number": { "type": "S", "required": false }, "application_credential_id": { "type": "S", "required": false }, "application_id": { "type": "S", "required": false }, "employee_id": { "type": "S", "required": false }, "entity_id": { "type": "S", "required": false }, "entity_credential_id": { "type": "S", "required": false }, "display_name": { "type": "S", "required": false }, "session_id": { "type": "S", "required": false }, "status": { "type": "S", "required": false }, "expires_at": { "type": "S", "required": false }, "failure_code": { "type": "S", "required": false }, "failure_reason": { "type": "S", "required": false } } } } Request Payload --------------- .. code-block:: json { "session_id": "8d4e7d32-2f6f-4d13-9b8e-0f4e98ef0001", "entity_number": "1000", "application_name": "value_00", "employee_number": "10000", "password": "JefTest-10000-Q7mR" } CMD curl -------- .. code-block:: bat curl -X POST "https://mfr670zvsh.execute-api.ap-southeast-1.amazonaws.com/prod/jef-one-validate-login-and-create-session" \ -H "Content-Type: application/json" \ --data-raw '{"session_id":"8d4e7d32-2f6f-4d13-9b8e-0f4e98ef0001","entity_number":"1000","application_name":"value_00","employee_number":"10000","password":"JefTest-10000-Q7mR"}' PowerShell curl --------------- .. code-block:: powershell curl.exe -X POST "https://mfr670zvsh.execute-api.ap-southeast-1.amazonaws.com/prod/jef-one-validate-login-and-create-session" ` -H "Content-Type: application/json" ` --data-raw '{"session_id":"8d4e7d32-2f6f-4d13-9b8e-0f4e98ef0001","entity_number":"1000","application_name":"value_00","employee_number":"10000","password":"JefTest-10000-Q7mR"}'