Security questions#
Checking for a question#
GET https://login.company.com/blitz/api/v3/users/{subjectId}/secQsn
Checking whether the user has a security question.
Required permissions: blitz_api_usec
or blitz_api_sys_usec
.
If the security question is asked - the text of the security question.
If the security question is not asked -
404 Not Found
.
Example
GET /blitz/api/v3/users/d2580c98-e584-4aad-a591-97a8cf45cd2a/secQsn HTTP/1.1
Authorization: Bearer cNwIXatB0wk5ZHO0xG5kxuuLubesWcb_yPPqLOFWDuwzMDc0Nz
Cache-Control: no-cache
{
"question": "Как звали вашего первого питомца"
}
Checking the answer#
POST https://login.company.com/blitz/api/v3/users/{subjectId}/secQsn/check
Checking the correctness of the answer to the security question.
Required permissions: blitz_api_usec
or blitz_api_sys_usec
.
A security question (question
) and the answer to it (answer
).
In case of successful verification of the question and response -
204 No Content
.Otherwise -
400 Bad request
.
Example
POST /blitz/api/v3/users/d2580c98-e584-4aad-a591-97a8cf45cd2a/secQsn/check HTTP/1.1
Authorization: Bearer cNwIXatB0wk5ZHO0xG5kxuuLubesWcb_yPPqLOFWDuwzMDc0Nz
Content-Type: application/json
X-Forwarded-For: 200.200.100.100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5)…
{
"question": "Как звали вашего первого питомца",
"answer": "Тигр"
}
{
"type": "process_error",
"error": "wrong_security_answer",
"desc": "security question not match"
}
{
"type": "process_error",
"error": "wrong_security_answer",
"desc": "security answer not match"
}
{
"type": "process_error",
"error": "wrong_security_answer",
"desc": "security question not found"
}
Setting or changing a question#
POST https://login.company.com/blitz/api/v3/users/{subjectId}/secQsn
Setting or changing the user’s security question.
Required permissions: blitz_api_sys_usec_chg
or blitz_api_sys_usec_chg
.
A security question (question
) and the answer to it (answer
).
In case of successful setting of the security question - 204 No Content
.
POST /blitz/api/v3/users/d2580c98-e584-4aad-a591-97a8cf45cd2a/secQsn HTTP/1.1
Authorization: Bearer cNwIXatB0wk5ZHO0xG5kxuuLubesWcb_yPPqLOFWDuwzMDc0Nz
Content-Type: application/json
X-Forwarded-For: 200.200.100.100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5)…
{
"question": "Как звали вашего первого питомца",
"answer": "Тигр"
}
Deleting a question#
DELETE https://login.company.com/blitz/api/v3/users/{subjectId}/secQsn
Deleting the security question from the user’s account.
Required permissions: blitz_api_usec_chg``or ``blitz_api_sys_usec_chg
.
If successful - 204 No Content
.
DELETE /blitz/api/v3/users/d2580c98-e584-4aad-a591-97a8cf45cd2a/secQsn HTTP/1.1
Authorization: Bearer cNwIXatB0wk5ZHO0xG5kxuuLubesWcb_yPPqLOFWDuwzMDc0Nz
X-Forwarded-For: 200.200.100.100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5)…