Logging Out
In order to log out, it is required to invalidate the user session that was created when logging in. If cookies are being used, the cookie will also be invalidated. Two options for logging out are being offered - either invalidate a single session or else, invalidate all sessions that are active on your user ID.
Invalidating a Single Session
You use the following POST request to invalidate a single session.
POST /auth/logout
If no JSON data is sent, the system expects to find a valid authentication cookie. If such a cookie is found, the cookie is deleted, and the session is invalidated from the server. If JSON data is sent, then the session and user ID are read from the JSON object as described below.
If this request is done via POST, then a JSON response as described below will be returned. If GET is used, the response is not in JSON but in user-friendly HTML. If you are using GET and still would like to receive a JSON response, add the parameter resultFormat=raw so the URL should be https://api.revulytics.com/auth/logout?resultFormat=raw.
This request to invalidate a single session the following properties.
Property |
Description |
|||||||||
Request JSON Object |
|
|||||||||
Request Headers |
|
|||||||||
Response Headers |
|
|||||||||
Status Codes |
|
|||||||||
Response JSON Object |
|