Save platform 2FA settings (savePlatformTwoFaSettings)
Save 2FA settings for platform. The settings have following properties:
-
providers - the list of 2FA providers' configs. Users will only be allowed to use 2FA providers from this list.
-
minVerificationCodeSendPeriod - minimal period in seconds to wait after verification code send request to send next request.
-
verificationCodeCheckRateLimit - rate limit configuration for verification code checking. The format is standard: 'amountOfRequests:periodInSeconds'. The value of '1:60' would limit verification code checking requests to one per minute.
-
maxVerificationFailuresBeforeUserLockout - maximum number of verification failures before a user gets disabled.
-
totalAllowedTimeForVerification - total amount of time in seconds allotted for verification. Basically, this property sets a lifetime for pre-verification token. If not set, default value of 30 minutes is used.
TOTP 2FA provider config has following settings:
- issuerName - issuer name that will be displayed in an authenticator app near a username. Must not be blank.
For SMS 2FA provider:
- smsVerificationMessageTemplate - verification message template. Available template variables are ${code} and ${userEmail}. It must not be blank and must contain verification code variable.
- verificationCodeLifetime - verification code lifetime in seconds. Required to be positive.
For EMAIL provider type:
- verificationCodeLifetime - the same as for SMS.
Example of the settings:
{
"providers": [
{
"providerType": "TOTP",
"issuerName": "TB"
},
{
"providerType": "EMAIL",
"verificationCodeLifetime": 60
},
{
"providerType": "SMS",
"verificationCodeLifetime": 60,
"smsVerificationMessageTemplate": "Here is your verification code: ${code}"
}
],
"minVerificationCodeSendPeriod": 60,
"verificationCodeCheckRateLimit": "3:900",
"maxVerificationFailuresBeforeUserLockout": 10,
"totalAllowedTimeForVerification": 600
}
Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.
Request body
Response
OK