Added auth to server hook.

This commit is contained in:
2025-01-23 20:58:46 -08:00
parent 8700c431cf
commit 5487a23c86
24 changed files with 1305 additions and 55 deletions

View File

@ -1,24 +1,28 @@
GET http://localhost:5173/api
@token=token
GET https://localhost:5173/api
Accept: application/json
###
GET http://localhost:5173/api/games
GET https://localhost:5173/api/games
Accept: application/json
Authorization: Bearer {{token}}
###
POST https://localhost:5173/api/games
Accept: application/json
Authorization: Bearer {{token}}
###
GET https://localhost:5173/api/games/de4cdb8c-0346-4ac6-a7a8-b4135b2d79e3
Accept: application/json
###
POST http://localhost:5173/api/games
Accept: application/json
###
GET http://localhost:5173/api/games/de4cdb8c-0346-4ac6-a7a8-b4135b2d79e3
Accept: application/json
###
PUT http://localhost:5173/api/games/de4cdb8c-0346-4ac6-a7a8-b4135b2d79e3
PUT https://localhost:5173/api/games/de4cdb8c-0346-4ac6-a7a8-b4135b2d79e3
Accept: application/json
Content-Type: application/json
@ -30,12 +34,32 @@ Content-Type: application/json
###
POST http://localhost:5173/api/games/de4cdb8c-0346-4ac6-a7a8-b4135b2d79e3/turns
POST https://localhost:5173/api/games/de4cdb8c-0346-4ac6-a7a8-b4135b2d79e3/turns
Accept: application/json
Content-Type: application/json
Authorization: Bearer {{token}}
{
"kind": "Roll",
"player": 2,
"value": 4
}
###
POST https://localhost:5173/api/users
Accept: application/json
Content-Type: application/json
{
"username": "worf",
"password": "klingon",
"role": "player"
}
###
POST https://localhost:5173/api/token
Accept: application/json
Content-Type: application/json
Authorization: Basic worf:klingon