OAuth 2.1 authorization and token exchange
OAuth 2.1 authorization and token exchange
(authorize-response {:keys [db oauth-client identity-id auth-time params]
:as opts})Happy path, store a code for later token exchange, and send the user back to the Relying Party
Happy path, store a code for later token exchange, and send the user back to the Relying Party
(client-checks oauth-client {:keys [redirect_uri response_type scope state]})We've looked up the client in the database, check it against the parameters
We've looked up the client in the database, check it against the parameters
(component opts)(error-html-response message)(error-redirect-response redirect-uri kvs)(error-response error error-description)(GET-authorization-server-metadata
{:keys [request-method uri scheme headers authority] :as req})(GET-authorize {:keys [db parameters session] :as req})(handle-authorization-code-grant req db params)Token exchange: handle code grant type
Token exchange: handle `code` grant type
(handle-client-credentials-grant req db params)Token exchange: handle client_credentials grant type
Token exchange: handle `client_credentials` grant type
(handle-refresh-token-grant db params)Token exchange: handle refresh_token grant type
Token exchange: handle `refresh_token` grant type
(identity-checks req session params)Check if there's an authenticated user in the session, if not, redirect to the login page
Check if there's an authenticated user in the session, if not, redirect to the login page
(permission-dialog-response oauth-client scope params req)Ask the user permission for the requested scopes
Ask the user permission for the requested scopes
(POST-exchange-token {:keys [db parameters] :as req})(pre-client-checks {:keys [redirect_uri client_id]})Initial checks, before we have a client+redirect to send the user back to
Initial checks, before we have a client+redirect to send the user back to
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |