跳到主要内容

updateLoginSettings

LoginSettingsWrapper updateLoginSettings(LoginSettingsRequestDto)

PUT /api/2.0/settings/security/loginsettings

Update login settings

Replaces the brute-force protection of the sign-in form for the whole portal: attemptCount failed attempts inside a rolling window of checkPeriod seconds, after which the offender is blocked for blockTime seconds. All three values are replaced together and each has to be between 1 and 9999, so read the current ones with GET api/2.0/settings/security/loginsettings before changing only one of them; a value outside the range is rejected as an invalid request. The caller needs the portal-settings right of a DocSpace administrator, otherwise the call is refused. Failed attempts are counted per user name and client address, so one member's lockout leaves the rest of the portal signing in normally, and a blocked pair is refused even once the password is finally correct. The new numbers apply to attempts made from now on and leave counters and blocks already running as they are. The change is recorded in the audit trail, and the answer is the stored settings with the flag that says whether they still match the shipped defaults.

Parameters​

NameInTypeDescriptionNotes
LoginSettingsRequestDtobodyLoginSettingsRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The brute-force protection settings as they were stored, with the flag that says whether they match the shipped defaultsLoginSettingsWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read, or attemptCount, checkPeriod or blockTime is missing or outside 1-9999--
403The caller has no portal-settings right--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

LoginSettingsWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json