Wowlfy / Redline

groupe 2
0 stars 0 forks source link

Authentification fonctionnelle #60

Closed Johann771 closed 1 year ago

Johann771 commented 1 year ago

Closes #65

POST http://localhost:8080/login Content-Type: application/json

{ "username":"(mail)", "password": "(password)" }

<> 2023-05-05T151518.404.json

GET http://localhost:8080/api/salle Authorization: Bearer (token)

axel37 commented 1 year ago

Ne pas oublier de générer un secret et de le renseigner dans application.properties : openssl rand -base64 45

Ensuite, générer un hash de mot de passe pour un utilisateur : https://bcrypt-generator.com/ (choisir rounds = 10)

axel37 commented 1 year ago

Exemple :

GET http://localhost:8080/api/site/get
Authorization: Bearer azertyazertyazerty

###

POST http://localhost:8080/login
Content-Type: application/json

{
  "username": "test@mail.org",
  "password": "mdp"
}