Skip to content
This repository has been archived by the owner on Sep 10, 2020. It is now read-only.

2.1 Se connecter déconnecter

Vincent Séguin edited this page Sep 15, 2019 · 3 revisions
POST /login

Cet appel est nécessaire pour obtenir un access_token. Ce token est nécessaire pour tous les appels subséquents au service.

Entrée (body)

Le content-type doit être absolument application/x-www-form-urlencoded (Type par défault d'un POST d'un formulaire)

email: String
password: String
Sortie
{
    "email": "john.smith@mail.com",
    "name": "John Smith",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI1M2VjMWVhMmQ3N2FhZmU3N2Q4YzM3YjgiLCJleHAiOjE0MDg2NzI4ODI4ODV9.5wLLC8kqaQyPGWKAidYZpsMz5XJtwk2Np1KmYEusizY",
    "id": "53ec1ea2d7121fe77d8c37b8"
}
POST /logout

Vide la session et redirige vers /login