Logout User
Deactivate a session token retrieved from loginUser.
POST https://instance.securid.com/aveksa/command.submit?cmd=logoutUser
Request
Parameters
| logoutUser | |
| format | properties - (Default) Returns the response as key=value pairs.json - Returns the response as JSON. |
Headers
Bearer token | |
| Accept | application/json |
| Content-Type | application/json |
Response
This command returns no output parameters. Use the HTTP status code to determine success.
Examples
Request
- Curl
- Python
- Node.js
curl -K -X POST \
"https://instance.securid.com/aveksa/command.submit?cmd=logoutUser&format=json" \
-H "Authorization: Bearer <token>"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "logoutUser",
"format": "json"
}
headers = {
'Authorization': 'Bearer <token>'
}
response = requests.post(url, params=params, headers=headers)
if response.status_code == 200:
print("Logged out successfully")
else:
print(f"Request failed with status code {response.status_code}")
const axios = require('axios');
const url = "https://instance.securid.com/aveksa/command.submit";
const params = {
cmd: "logoutUser",
format: "json"
};
const headers = {
'Authorization': 'Bearer <token>'
};
axios.post(url, null, { params, headers })
.then(response => {
if (response.status === 200) {
console.log("Logged out successfully");
} else {
console.log(`Request failed with status code ${response.status}`);
}
})
.catch(error => {
console.error('Error:', error);
});
Response
- 200
- 401 Invalid Token
- 401 No Token
{
"data": {
"type": "logoutUser"
}
}
<html>
<head>
<title>Error</title>
</head>
<body>The token is not valid for the command 'logoutUser'. Token is invalid or expired</body>
</html>
Returned when the Authorization header is omitted entirely.
<html>
<head>
<title>Error</title>
</head>
<body>The token is required for the command 'logoutUser'</body>
</html>
See Also
Verified with RSA Governance & Lifecycle version 8.0.0.188886 P10_HF01.