Logout

Logs out the current user by invalidating his/hers JWT token.

{warning} The user must be logged in, in order to request this resource


Method Uri Auth Permissions
POST /v1/auth/logout Bearer JWT-Token none

Headers

The API requires a header Accept and Authorization to be submitted with the request:

{
    "Accept": "application/json",
    "Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3M..." 
}

Success Responses

Condition : All required data provided is valid and added to the request body.

Code : 201 Created

Content example : Response will reflect back the created message':

{
    "message": "Successfully logged out"
}

Error Responses

Condition : If a user is not logged in or header data is imcomplete.

Code : 401 Unauthorized

Content example :

{
  "error": "Unauthorized"
}