Skip to content

Save the authentication policy

PUT
/v1/setup/auth-policy
curl --request PUT \
--url http://localhost:8080/v1/setup/auth-policy \
--header 'Content-Type: application/json' \
--data '{ "accessTokenMinutes": 1, "refreshTokenHours": 1, "otpTtlMinutes": 1, "passwordMinLength": 1, "passwordLoginEnabled": true, "otpLoginEnabled": true, "allowedEmailDomains": [ "example" ], "publicUrl": "example" }'

Step 5. Stores token lifetimes (access 1–60 minutes, refresh 1–720 hours), the sign-in link lifetime, the minimum password length (8–128), which sign-in methods are enabled, the allowed email domains (empty = any) and the public URL used in emailed links. Administrators only. 400 when both sign-in methods are disabled or a value is out of range.

Media typeapplication/json
object
accessTokenMinutes
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
refreshTokenHours
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
otpTtlMinutes
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
passwordMinLength
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
passwordLoginEnabled
boolean
otpLoginEnabled
boolean
allowedEmailDomains
Array<string>
publicUrl
string
Examplegenerated
{
"accessTokenMinutes": 1,
"refreshTokenHours": 1,
"otpTtlMinutes": 1,
"passwordMinLength": 1,
"passwordLoginEnabled": true,
"otpLoginEnabled": true,
"allowedEmailDomains": [
"example"
],
"publicUrl": "example"
}

No Content