2017-11-03 09:51:50 +00:00
|
|
|
post_verify_code_schema = {
|
2023-08-29 14:54:30 -07:00
|
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
|
|
|
"description": "POST schema for verifying a 2fa code",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"code": {"type": "string"},
|
|
|
|
|
"code_type": {"type": "string"},
|
2017-11-03 09:51:50 +00:00
|
|
|
},
|
2023-08-29 14:54:30 -07:00
|
|
|
"required": ["code", "code_type"],
|
|
|
|
|
"additionalProperties": False,
|
2017-11-03 09:51:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2021-05-17 20:32:01 +01:00
|
|
|
post_verify_webauthn_schema = {
|
2023-08-29 14:54:30 -07:00
|
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
|
|
|
"description": "POST schema for verifying a webauthn login attempt",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {"successful": {"type": "boolean"}},
|
|
|
|
|
"required": ["successful"],
|
|
|
|
|
"additionalProperties": False,
|
2021-05-17 20:32:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-11-03 09:51:50 +00:00
|
|
|
post_send_user_email_code_schema = {
|
2023-08-29 14:54:30 -07:00
|
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
|
|
|
"description": (
|
2017-11-07 16:05:43 +00:00
|
|
|
'POST schema for generating a 2fa email - "to" is required for legacy purposes. '
|
|
|
|
|
'"next" is an optional url to redirect to on sign in'
|
|
|
|
|
),
|
2023-08-29 14:54:30 -07:00
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
2017-11-03 16:00:22 +00:00
|
|
|
# doesn't need 'to' as we'll just grab user.email_address. but lets keep it
|
|
|
|
|
# as allowed to keep admin code cleaner, but only as null to prevent confusion
|
2023-08-29 14:54:30 -07:00
|
|
|
"to": {"type": "null"},
|
|
|
|
|
"email_auth_link_host": {"type": ["string", "null"]},
|
|
|
|
|
"next": {"type": ["string", "null"]},
|
2017-11-03 09:51:50 +00:00
|
|
|
},
|
2023-08-29 14:54:30 -07:00
|
|
|
"required": [],
|
|
|
|
|
"additionalProperties": False,
|
2017-11-03 09:51:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
post_send_user_sms_code_schema = {
|
2023-08-29 14:54:30 -07:00
|
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
|
|
|
"description": "POST schema for generating a 2fa sms",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"to": {"type": ["string", "null"]},
|
2017-11-03 09:51:50 +00:00
|
|
|
},
|
2023-08-29 14:54:30 -07:00
|
|
|
"required": [],
|
|
|
|
|
"additionalProperties": False,
|
2017-11-03 09:51:50 +00:00
|
|
|
}
|
2019-02-22 11:26:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
post_set_permissions_schema = {
|
|
|
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
|
|
|
"description": "POST schema for setting user permissions",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"permissions": {"type": "array", "items": {"type": "object"}},
|
2023-08-29 14:54:30 -07:00
|
|
|
"folder_permissions": {"type": "array", "items": {"type": "string"}},
|
2019-02-22 11:26:44 +00:00
|
|
|
},
|
|
|
|
|
"required": ["permissions"],
|
2023-08-29 14:54:30 -07:00
|
|
|
"additionalProperties": False,
|
2019-02-22 11:26:44 +00:00
|
|
|
}
|