aboutsummaryrefslogtreecommitdiffstats
path: root/rust/HACKING.md
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-08 16:28:27 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-08 16:28:27 -0800
commit16f2e78298dbd2231f5f337ea17c89a6a131a052 (patch)
tree6e72581e625e73c97cbab72d0f9c35665c99e5d7 /rust/HACKING.md
parenteb40a5f274f3608db34309cfd16739a7642ef5e7 (diff)
parentffb721f90c5d97ee80885209bf45feb85ca9625c (diff)
downloadfatcat-16f2e78298dbd2231f5f337ea17c89a6a131a052.tar.gz
fatcat-16f2e78298dbd2231f5f337ea17c89a6a131a052.zip
Merge branch 'bnewbold-crude-auth'
Fixed a conflict in: python/fatcat_export.py
Diffstat (limited to 'rust/HACKING.md')
-rw-r--r--rust/HACKING.md13
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.