From f0de8bb2c2d0661afbe91f16b7f1412e4d225383 Mon Sep 17 00:00:00 2001 From: "Yann Esposito (Yogsototh)" Date: Tue, 8 Feb 2022 13:56:45 +0100 Subject: [PATCH] notes/new_iroh_auth_apis.org --- notes/new_iroh_auth_apis.org | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/notes/new_iroh_auth_apis.org b/notes/new_iroh_auth_apis.org index 03e5f291..6abede6d 100644 --- a/notes/new_iroh_auth_apis.org +++ b/notes/new_iroh_auth_apis.org @@ -24,6 +24,14 @@ Have a ~.../user-identity/...~ instead of ~.../user/...~ Etc… Then create new proto-Web API using this new configuration for the JWT. + +#+begin_src clojure +(web/defwebservice-with-params iroh-auth-spa-api [] + {,,, + :options {:jwt-middleware-option-patch + {:jwt-check-fn user-identity-jwt-check-fn}}} +#+end_src + The first endpoint should be ~GET /iroh/iroh-auth-apis/whoami~ whose only goal would be to display a user-friendly JSON of the ~identity~ field of the ring request.