feat(api): declare identity contract for registration, verification, and sessions
This commit is contained in:
1 parent
197661145e
commit
653f3775f8
86 files changed
+11826
-148
No files matched your search
@@ -157,3 +157,59 @@ Problem:
|
||||
$ref: ./examples.yml#/Internal
|
||||
not_implemented:
|
||||
$ref: ./examples.yml#/NotImplemented
|
||||
RegistrationValidationFailed:
|
||||
description: >-
|
||||
The body does not match the contract or violates a registration rule:
|
||||
a password outside 15-128 characters or on the blocklist, or a consent
|
||||
text version that is not the current one; code validation_failed with
|
||||
body pointers. An email that already belongs to an account is never a
|
||||
validation error.
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: ./schemas.yml#/Problem
|
||||
examples:
|
||||
validation_failed:
|
||||
$ref: ./examples.yml#/RegistrationValidationFailed
|
||||
EmailVerificationFailed:
|
||||
description: >-
|
||||
The token cannot verify an email. Code verification_token_expired means
|
||||
the token is past its lifetime; verification_token_invalid means it is
|
||||
unknown, already used, or replaced by a newer link; validation_failed
|
||||
with the pointer `/token` means the token is malformed. Nothing was
|
||||
changed in any case.
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: ./schemas.yml#/Problem
|
||||
examples:
|
||||
verification_token_expired:
|
||||
$ref: ./examples.yml#/VerificationTokenExpired
|
||||
verification_token_invalid:
|
||||
$ref: ./examples.yml#/VerificationTokenInvalid
|
||||
validation_failed:
|
||||
$ref: ./examples.yml#/VerificationTokenMalformed
|
||||
InvalidCredentials:
|
||||
description: >-
|
||||
The email and password do not match an account; code
|
||||
invalid_credentials. An unknown email and a wrong password get the same
|
||||
response.
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: ./schemas.yml#/Problem
|
||||
examples:
|
||||
invalid_credentials:
|
||||
$ref: ./examples.yml#/InvalidCredentials
|
||||
CsrfCheckFailed:
|
||||
description: >-
|
||||
The request failed cross-site request protection: the X-CSRF-Token
|
||||
header is missing or does not belong to the session, or the Origin is
|
||||
not allowed; code csrf_check_failed. Nothing was changed.
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: ./schemas.yml#/Problem
|
||||
examples:
|
||||
csrf_check_failed:
|
||||
$ref: ./examples.yml#/CsrfCheckFailed
|
||||
Reference in new issue
Block a user