Skip to content

westindev-lbr/clean-architecture-authApi

Repository files navigation

DOC API AUTHENTIFICATION

Projet Securité Axel Labarre L3 - Université de Paris 8

S'enregistrer

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

Se connecter

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

Liste des étudiants

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..."

How to use :

  • Install .NET 6

https://dotnet.microsoft.com/en-us/download/dotnet/6.0

dotnet build
dotnet run --project alabarre.Api

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages