diff options
Diffstat (limited to 'rust/HACKING.md')
-rw-r--r-- | rust/HACKING.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/rust/HACKING.md b/rust/HACKING.md index 57642b2d..b3a551fa 100644 --- a/rust/HACKING.md +++ b/rust/HACKING.md @@ -54,6 +54,19 @@ Debug SQL schema errors (if diesel commands fail): ## Direct API Interaction +First setup an auth token and check that authentication is working + + EDITOR_ID='aaaaaaaaaaaabkvkaaaaaaaaay' + AUTH_TOKEN=`./target/debug/fatcat-auth create-token $EDITOR_ID` + http get :9411/v0/auth/check "Authorization:Bearer $AUTH_TOKEN" + http get :9411/v0/auth/check?role=admin "Authorization:Bearer $AUTH_TOKEN" + +You'll need to add the `$AUTH_TOKEN` bit to all requests below. + Creating entities via API: http --json post localhost:9411/v0/container name=asdf issn=1234-5678 + +## Authentication + +Uses macaroons. See `notes/auth.md` and maybe look in the guide. |