🤦‍♀ Déconnexion

Déconnexion de l'utilisateur en invalidant le jeton

Description

ENDPOINT DESCRIPTION METHODE EXEMPLE
/_logout JWT à transmettre dans l'en-tête. La valeur de l'en-tête doit être au format Bearer [JWT]. JWT doit être remplcé par un véritable jeton JWT POST https://api.comexposium-sso.com/_logout

Exemple d'appel

curl -X POST "https://api.comexposium-sso.com/_logout" -H "accept: application/json" -H "Authorization: Bearer myjwt_token"

Détails

Réponses

Vous pouvez obtenir un code de statut 200 ou 401 en utilisant ce endpoint, vous trouverez l'information dans l'attribut statusCode.

Succès

Logout successful

Exemple:

{
  "requestId": "8c8082ee-75c1-41ed-b8a4-80fda94ec911",
  "status": 200,
  "error": null,
  "controller": "auth",
  "action": "logout",
  "collection": null,
  "index": null,
  "volatile": null,
  "result": {
    "acknowledged": true
  }
}

Erreurs

Json Web Token Error

Exemple:

{
  "requestId": "dd5a786f-4085-44bc-abad-9302673e6f2d",
  "status": 401,
  "error": {
    "message": "Json Web Token Error",
    "status": 401,
    "stack": "UnauthorizedError: Json Web Token Error\n    at UnauthorizedError (/opt/kuzzle/node_modules/kuzzle-common-objects/lib/errors/unauthorizedError.js:5:5)\n    at TokenRepository.verifyToken (/opt/kuzzle/lib/api/core/models/repositories/tokenRepository.js:152:17)\n    at FunnelController.checkRights (/opt/kuzzle/lib/api/controllers/funnelController.js:316:43)\n    at FunnelController.execute (/opt/kuzzle/lib/api/controllers/funnelController.js:218:10)\n    at kuzzle.pluginsManager.trigger.then.mutatedRequest (/opt/kuzzle/lib/api/controllers/routerController.js:146:28)\n    at tryCatcher (/opt/kuzzle/node_modules/bluebird/js/release/util.js:16:23)\n    at Promise._settlePromiseFromHandler (/opt/kuzzle/node_modules/bluebird/js/release/promise.js:512:31)\n    at Promise._settlePromise (/opt/kuzzle/node_modules/bluebird/js/release/promise.js:569:18)\n    at Promise._settlePromise0 (/opt/kuzzle/node_modules/bluebird/js/release/promise.js:614:10)\n    at Promise._settlePromises (/opt/kuzzle/node_modules/bluebird/js/release/promise.js:693:18)\n    at Async._drainQueue (/opt/kuzzle/node_modules/bluebird/js/release/async.js:133:16)\n    at Async._drainQueues (/opt/kuzzle/node_modules/bluebird/js/release/async.js:143:10)\n    at Immediate.Async.drainQueues (/opt/kuzzle/node_modules/bluebird/js/release/async.js:17:14)\n    at runCallback (timers.js:637:20)\n    at tryOnImmediate (timers.js:610:5)\n    at processImmediate [as _immediateCallback] (timers.js:582:5)"
  },
  "controller": "auth",
  "action": "logout",
  "collection": null,
  "index": null,
  "volatile": null,
  "result": null
}