notes/new_iroh_auth_apis.org

This commit is contained in:
Yann Esposito (Yogsototh) 2022-02-08 13:56:45 +01:00
parent a4a98c0b7b
commit f0de8bb2c2
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646

View file

@ -24,6 +24,14 @@ Have a ~.../user-identity/...~ instead of ~.../user/...~
Etc… Etc…
Then create new proto-Web API using this new configuration for the JWT. 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~ 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~ whose only goal would be to display a user-friendly JSON of the ~identity~
field of the ring request. field of the ring request.