2017-11-03 09:51:50 +00:00
|
|
|
post_verify_code_schema = {
|
|
|
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
|
|
|
'description': 'POST schema for verifying a 2fa code',
|
|
|
|
|
'type': 'object',
|
|
|
|
|
'properties': {
|
|
|
|
|
'code': {'type': 'string'},
|
|
|
|
|
'code_type': {'type': 'string'},
|
|
|
|
|
},
|
2017-11-03 16:00:22 +00:00
|
|
|
'required': ['code', 'code_type'],
|
|
|
|
|
'additionalProperties': False
|
2017-11-03 09:51:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
post_send_user_email_code_schema = {
|
|
|
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
|
|
|
'description': 'POST schema for generating a 2fa email',
|
|
|
|
|
'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
|
|
|
|
|
'to': {'type': 'null'},
|
2017-11-03 09:51:50 +00:00
|
|
|
'next': {'type': ['string', 'null']},
|
|
|
|
|
},
|
|
|
|
|
'required': [],
|
2017-11-03 16:00:22 +00:00
|
|
|
'additionalProperties': False
|
2017-11-03 09:51:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
post_send_user_sms_code_schema = {
|
|
|
|
|
'$schema': 'http://json-schema.org/draft-04/schema#',
|
|
|
|
|
'description': 'POST schema for generating a 2fa email',
|
|
|
|
|
'type': 'object',
|
|
|
|
|
'properties': {
|
|
|
|
|
'to': {'type': ['string', 'null']},
|
|
|
|
|
},
|
|
|
|
|
'required': [],
|
2017-11-03 16:00:22 +00:00
|
|
|
'additionalProperties': False
|
2017-11-03 09:51:50 +00:00
|
|
|
}
|