aboutsummaryrefslogtreecommitdiffstats
path: root/rust/HACKING.md
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-07 18:08:09 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-07 18:08:09 -0800
commit35f3f55aac364373ba16191abdb3c0c585249245 (patch)
tree444c4bd10e38c3935e250f760426c9a03536f035 /rust/HACKING.md
parent75c9831cf6e71b7a24e99e34cbe74845d1bfeed0 (diff)
downloadfatcat-35f3f55aac364373ba16191abdb3c0c585249245.tar.gz
fatcat-35f3f55aac364373ba16191abdb3c0c585249245.zip
add auth/check endpoint
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