Projet Securité Axel Labarre L3 - Université de Paris 8
POST {{host}}api/auth/register
curl -X POST -H 'Content-Type: application/json' -d '{"email": "[email protected]",
"studentNum": 20006281,
"firstName": "Axel",
"lastName": "Labarre",
"password": "toto93"}' https://localhost:7206/api/auth/register
POST {{host}}api/auth/login
curl -X POST -H 'Content-Type: application/json' -d '{"email": "[email protected]", "password": "password"}' https://localhost:7206/api/auth/login
GET {{host}}api/user/all
Authorization: Bearer xxxxxxxx
xxxxxxxx -> votre token Afin de pouvoir accéder à la liste des étudiants il faut que l'api vérifie votre token lors de la requête http. Il faut donc que votre token soit présent dans le header.Authorization HTTP
curl -i https://localhost:7206/api/user/all -H "Authorization: Bearer xxxxxxxx..."
- Install .NET 6
dotnet build
dotnet run --project alabarre.Api