summaryrefslogtreecommitdiffstats
path: root/rust/HACKING.md
diff options
context:
space:
mode:
Diffstat (limited to 'rust/HACKING.md')
-rw-r--r--rust/HACKING.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/rust/HACKING.md b/rust/HACKING.md
index 9d161b87..b3a551fa 100644
--- a/rust/HACKING.md
+++ b/rust/HACKING.md
@@ -54,6 +54,15 @@ 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