From 2e0596c924abd850fa65cc96e8b63fb9cf36cb9d Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Wed, 3 Apr 2024 16:12:34 -0700 Subject: [PATCH] rest test file has been updated --- rest.http | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/rest.http b/rest.http index a5a5dc3..e3fb84c 100644 --- a/rest.http +++ b/rest.http @@ -1,7 +1,41 @@ +### Create a standard User +POST http://localhost:1323/api/v1/auth/register?username=test&password=test1234! +Content-Type: application/x-www-form-urlencoded + +name=test&password=test1234! +### Login with user +POST http://localhost:1323/api/v1/auth/login +Content-Type: application/x-www-form-urlencoded + +name=test&password=test1234! + +### Login with the admin token +POST http://localhost:1323/api/v1/auth/login +Content-Type: application/x-www-form-urlencoded + +password=lol + + +### Add Scope to test user +POST http://localhost:1323/api/v1/auth/scopes/add +Content-Type: application/json +Authorization: Bearer + +{ + "name": "test", + "scopes": [ + "recipe:create" + ] +} + +### Remove scope from test user +POST http://localhost:1323/api/v1/auth/scopes/remove +Content-Type: application/json +Authorization: Bearer + + ### -POST http://localhost:1323/api/v1/register?username=test&password=test1234! -### -POST http://localhost:1323/api/v1/login?username=test&password=test1234! +POST http://localhost:1323/api/v1/ ### GET http://localhost:1323/api/v1/demo/hello ###