Skip to main content

logOutActiveConnection

BooleanWrapper logOutActiveConnection(loginEventId)

PUT /api/2.0/security/activeconnections/logout/{loginEventId}

Log out one connection

Closes one active connection: the sign-in behind loginEventId is marked inactive, the token and cookie tied to it stop working, the client holding it is disconnected and a logout entry is written to the portal audit trail. Take loginEventId from the id of an item of GET api/2.0/security/activeconnections, which also reports in loginEvent which connection the caller is using, so a client can avoid closing its own. A user may close their own connections, while closing somebody else's requires a DocSpace administrator and any other caller is refused with 403. The call is mutating, destructive for that one session and idempotent, and it leaves every other connection of the user alone - PUT api/2.0/security/activeconnections/logoutallexceptthis is the way to close the rest in one go. Only true means the connection was open and has just been closed; false comes back when this portal has no such active connection, including one that was already closed, and after any other failure.

Parameters​

NameInTypeDescriptionNotes
loginEventIdpathInteger (int32)The sign-in to act on, by login event ID. Take it from the id of an item of GET api/2.0/security/activeconnections, which also marks the connection the caller is using, so a client can avoid picking its own.[required] [example: 12345]

Responses​

Status codeDescriptionTypeResponse headers
200true when the connection was open and has been closed, false when this portal has no such active connection or the attempt failedBooleanWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The caller is not a DocSpace administrator and the connection belongs to another user--
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​

BooleanWrapper

Authorization​

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

HTTP request headers​

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