Aller au contenu

Auth.Auth

En bref

7 opérations sur 7 chemins. Préfixe /v2. Authentification JWT (voir Démarrer).

Opérations

Méthode Chemin Rôle
POST /v2/auth/change-password Changement de mot de passe de l'utilisateur connecté.
POST /v2/auth/login Connexion par identifiants (401 si échec).
POST /v2/auth/login-token Connexion par jeton (401 si échec).
GET /v2/auth/ping Test de vie (anonyme).
POST /v2/auth/refresh-token Rafraîchissement du jeton (401 si échec).
POST /v2/auth/register Inscription d'un utilisateur.
GET /v2/auth/test Vérifie que le jeton est valide.

Détail

POST /v2/auth/change-password

Changement de mot de passe de l'utilisateur connecté.

Corps de la requête (application/json)

Schéma UserDto - 2 propriétés (détail : Schémas).

Réponses

Code Description Schéma de data
200 OK -
401 Unauthorized -
403 Forbidden -

Exemple

curl -s -X POST "https://<votre-connecteur>/v2/auth/change-password" \
  -H "Authorization: Bearer <jeton>" \
  -H "Content-Type: application/json" \
  -d '{"username": "…", "password": "…"}'

POST /v2/auth/login

Connexion par identifiants (401 si échec).

Corps de la requête (application/json)

Schéma UserDto - 2 propriétés (détail : Schémas).

Réponses

Code Description Schéma de data
200 OK -

Exemple

curl -s -X POST "https://<votre-connecteur>/v2/auth/login" \
  -H "Content-Type: application/json" \
  -d '{"username": "…", "password": "…"}'

Cette opération est déclarée anonyme dans le contrat (aucun schéma de sécurité).

POST /v2/auth/login-token

Connexion par jeton (401 si échec).

Corps de la requête (application/json)

Schéma VerifyTokenDto - 4 propriétés (détail : Schémas).

Réponses

Code Description Schéma de data
200 OK -

Exemple

curl -s -X POST "https://<votre-connecteur>/v2/auth/login-token" \
  -H "Content-Type: application/json" \
  -d '{"email": "…", "token": "…", "hid": "…"}'

Cette opération est déclarée anonyme dans le contrat (aucun schéma de sécurité).

GET /v2/auth/ping

Test de vie (anonyme).

Réponses

Code Description Schéma de data
200 OK -

Exemple

curl -s -X GET "https://<votre-connecteur>/v2/auth/ping?targets=DEMO&limit=50" \
  -H "Accept: application/json"

Cette opération est déclarée anonyme dans le contrat (aucun schéma de sécurité).

POST /v2/auth/refresh-token

Rafraîchissement du jeton (401 si échec).

Réponses

Code Description Schéma de data
200 OK -

Exemple

curl -s -X POST "https://<votre-connecteur>/v2/auth/refresh-token" \
  -H "Accept: application/json"

Cette opération est déclarée anonyme dans le contrat (aucun schéma de sécurité).

POST /v2/auth/register

Inscription d'un utilisateur.

Corps de la requête (application/json)

Schéma UserDto - 2 propriétés (détail : Schémas).

Réponses

Code Description Schéma de data
200 OK -

Exemple

curl -s -X POST "https://<votre-connecteur>/v2/auth/register" \
  -H "Content-Type: application/json" \
  -d '{"username": "…", "password": "…"}'

Cette opération est déclarée anonyme dans le contrat (aucun schéma de sécurité).

GET /v2/auth/test

Vérifie que le jeton est valide.

Réponses

Code Description Schéma de data
200 OK -
401 Unauthorized -
403 Forbidden -

Exemple

curl -s -X GET "https://<votre-connecteur>/v2/auth/test?targets=DEMO&limit=50" \
  -H "Authorization: Bearer <jeton>" \
  -H "Accept: application/json"

Schémas

Schémas résolus à un niveau : les propriétés qui référencent un autre schéma sont citées par leur nom, sans être dépliées.

UserDto

UserDto - 2 propriétés
Propriété Type Notes
username string nullable
password string nullable

VerifyTokenDto

VerifyTokenDto - 4 propriétés
Propriété Type Notes
email string nullable
token string nullable
hid string nullable
service string nullable

Voir aussi

Écrans qui utilisent ce groupe

Documentation de SenSaaS v2. Chaque page est écrite à partir du produit livré ; ce qui reste à vérifier y est signalé.