Skip to main content

updateCookieSettings

StringWrapper updateCookieSettings(CookieSettingsRequestDto)

PUT /api/2.0/settings/cookiesettings

Update the cookie lifetime settings

Stores how long an authentication session of this portal stays valid: lifeTime in minutes together with the enabled flag that switches the limit on. The caller needs the portal-settings right of a DocSpace administrator - the portal owner and a DocSpace administrator qualify, any other member is refused - and on an installation whose configuration hides the cookie section nothing is stored and the call is answered with 402. A lifeTime above 9999 minutes is not rejected but clamped to 9999, while 0 or less clears the number instead, which with enabled true leaves sessions that never expire on their own. Any positive lifeTime raises the session version of the portal: every session issued before the call stops being accepted, and with enabled true the connections behind them are dropped as well. The caller is signed in again inside the same call and gets a fresh session cookie in the response, so a client that keeps sending the token it held before this call is the one locked out. The change is recorded in the audit trail. What comes back is a localized confirmation message; read the stored pair with GET api/2.0/settings/cookiesettings.

Parameters​

NameInTypeDescriptionNotes
CookieSettingsRequestDtobodyCookieSettingsRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200A localized message confirming that the session lifetime has been savedStringWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
402The installation hides the cookie lifetime section, or the portal's payment has lapsed--
403The caller has no portal-settings right--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.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​

StringWrapper

Authorization​

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

HTTP request headers​

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