Skip to content

Debzou/API_Secure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Config file : ./env

npm install
npm start

localhost:8080/signup

curl --location --request POST 'localhost:8080/signup' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username": "",
    "password" : "",
    "email" : ""
}'

localhost:8080/login

curl --location --request GET 'localhost:8080/login' \
--header 'Authorization: Basic YOUR_AUTH_ENCODED'

localhost:8080/proveAnthentication

curl --location --request GET 'localhost:8080/proveAnthentication' \
--header 'Authorization: Bearer YOUR_TOKEN'
--header 'Cookie: connect.sid=YOUR_COOKIE'

localhost:8080/logout

curl --location --request GET 'localhost:8080/logout' \
--header 'Cookie: connect.sid=YOUR_COOKIE'