feat(api): declare identity contract for registration, verification, and sessions

This commit is contained in:
shira committed 2026-10-05 22:57:19 +03:00
1 parent 197661145e
commit 653f3775f8
86 files changed
+11826 -148

No files matched your search

+97
View File
@@ -138,3 +138,100 @@ NotImplemented:
code: not_implemented
detail: This operation is not available yet.
trace_id: 0d1e2f3a-4b5c-4d6e-9f7a-8b9c0d1e2f3a
VerificationTokenInvalid:
summary: The verification token is unknown, used, or replaced
value:
type: urn:lincodex:problem:verification_token_invalid
title: Verification link is not valid
status: 400
code: verification_token_invalid
detail: Request a new verification link, or sign in if the address is already verified.
trace_id: 3b4c5d6e-7f8a-4b9c-8d0e-1f2a3b4c5d6e
VerificationTokenExpired:
summary: The verification token is past its lifetime
value:
type: urn:lincodex:problem:verification_token_expired
title: Verification link expired
status: 400
code: verification_token_expired
detail: Request a new verification link.
trace_id: 4c5d6e7f-8a9b-4c0d-9e1f-2a3b4c5d6e7f
VerificationTokenMalformed:
summary: The token from the link is malformed
value:
type: urn:lincodex:problem:validation_failed
title: Request validation failed
status: 400
code: validation_failed
detail: One or more request fields are invalid.
trace_id: 5d6e7f8a-9b0c-4d1e-8f2a-3b4c5d6e7f8a
errors:
- in: body
pointer: /token
code: invalid
message: The value does not match the contract.
InvalidCredentials:
summary: Unknown email or wrong password
value:
type: urn:lincodex:problem:invalid_credentials
title: Invalid email or password
status: 401
code: invalid_credentials
detail: Check the email and password and try again.
trace_id: 6e7f8a9b-0c1d-4e2f-9a3b-4c5d6e7f8a9b
EmailNotVerified:
summary: Correct credentials for an unverified email
value:
type: urn:lincodex:problem:email_not_verified
title: Email not verified
status: 403
code: email_not_verified
detail: Confirm the email address with the link from the verification message.
trace_id: 7f8a9b0c-1d2e-4f3a-8b4c-5d6e7f8a9b0c
CsrfCheckFailed:
summary: Missing or wrong CSRF token, or a disallowed Origin
value:
type: urn:lincodex:problem:csrf_check_failed
title: Cross-site request check failed
status: 403
code: csrf_check_failed
detail: Read the current session to get a new CSRF token and repeat the request.
trace_id: 8a9b0c1d-2e3f-4a4b-9c5d-6e7f8a9b0c1d
RegistrationValidationFailed:
summary: The password is too short and the consent text is outdated
value:
type: urn:lincodex:problem:validation_failed
title: Request validation failed
status: 400
code: validation_failed
detail: One or more request fields are invalid.
trace_id: 9b0c1d2e-3f4a-4b5c-8d6e-7f8a9b0c1d2e
errors:
- in: body
pointer: /password
code: invalid
message: The value does not match the contract.
- in: body
pointer: /consent_c1/text_version
code: invalid
message: The value does not match the contract.
CandidateAccount:
summary: A verified candidate on the questionnaire step
value:
id: 0f8b6c2e-4d1a-4e7b-9c3f-5a2d8e6b1c47
email: candidate@example.com
email_verified: true
scenario: candidate
onboarding_step: candidate_questionnaire
created_at: "2026-10-05T09:30:00Z"
CandidateSession:
summary: Session of a verified candidate
value:
account:
id: 0f8b6c2e-4d1a-4e7b-9c3f-5a2d8e6b1c47
email: candidate@example.com
email_verified: true
scenario: candidate
onboarding_step: candidate_questionnaire
created_at: "2026-10-05T09:30:00Z"
csrf_token: Xk4pR9tV2mQ7wL1sN8bC5dF0gH3jZ6yA9eU2iO7rT4c