Created
September 7, 2017 11:38
-
-
Save qleguennec/e7a8102f5fd1e5225b48b68c3c81918b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(rf/reg-event-fx | |
:auth | |
(fn [{:keys [db]} _] | |
{:POST | |
{:url "https://api.intra.42.fr/oauth/token" | |
:on-success #(assoc db :token (:access_token %)) | |
:on-fail :auth-nok | |
:params | |
{:grant_type "client_credentials" | |
:client_id "secret" | |
:client_secret "secret"}}})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment