Authentication modes#
Checking the status#
GET https://login.company.com/blitz/api/v3/users/{subjectId}/auth
Checking the status of the following authentication modes of the SubjectID account:
two-factor authentication enabled;
the presence of an established indication of the need to change the password;
the presence of a temporary ban on login using a certain login method.
Required permissions: blitz_api_usec or blitz_api_sys_usec.
requiredFactorindicates that two-factor authentication is enabled. It can take the following values:missing,
0or1- disabled,2- enabled (2nd authentication factor is required);
needPasswordChangeindicates the need to change the password when logging in;methodsLockedis a list of blocked authentication methods. The user cannot use these login methods, but can use the rest.
Example
GET /blitz/api/v3/users/d2580c98-e584-4aad-a591-97a8cf45cd2a/auth HTTP/1.1
Authorization: Bearer cNwIXatB0wk5ZHO0xG5kxuuLubesWcb_yPPqLOFWDuwzMDc0Nz
Cache-Control: no-cache
{
"requiredFactor": 2,
"needPasswordChange": true,
"methodsLocked": ["password"]
}
Changing authentication modes#
POST https://login.company.com/blitz/api/v3/users/{subjectId}/auth
Changes to user authentication modes.
Required permissions: blitz_api_usec_chg``or ``blitz_api_sys_usec_chg.
In user mode, headers with the user’s IP address and User-Agent must be passed.
It may contain parameters:
requiredFactorindicates that two-factor authentication is enabled. Values:nullis disabled,2is enabled (2nd authentication factor is required);
needPasswordChangeindicates the need to change the password when logging in – only passing the valuetrueis allowed;methodsLockedis a list of blocked authentication methods. The user cannot use these login methods, but can use the rest. Currently, Blitz Identity Provider only supports blocking the use of password login (password).
Example
POST /blitz/api/v3/users/d2580c98-e584-4aad-a591-97a8cf45cd2a/auth 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)…
Content-Type: application/json
{
"requiredFactor": 2,
"needPasswordChange": true,
"methodsLocked": ["password"]
}
{
"requiredFactor": 2,
"needPasswordChange": true,
"methodsLocked": ["password"]
}
{
"type": "input_error",
"error": "wrong_values",
"errors": [
{
"type": "input_error",
"error": "has_not_sf_methods",
"desc": "User 'd2580c98-e584-4aad-a591-97a8cf45cd2a' has not any second factor method",
"pos": "requiredFactor"
}
]
}