Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/blmstrm/loudmoauth
Browse files Browse the repository at this point in the history
  • Loading branch information
blmstrm committed Jul 7, 2016
2 parents 27b170d + d70fcfb commit 9ccfc35
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@ Configure your http-request handler to call the function `parse-params` when the
```Clojure
(defn handler [request]
(condp = (:uri request)
"/oauth2" (lm/parse-params request)
"/interact" (ringr/redirect (lm/user-interaction))
"/oauth2" (lmoauth/parse-params request)
"/interact" (ringr/redirect (lmoauth/user-interaction))
{:status 200
:body (:uri request)}))
```
Pass the map specified earlier as an argument to the `add-provider` function.
```Clojure
(lmoauth/add-provider spotify-oauth2-params)
```
Now visit the url that will trigger a call to `lm/user-interaction`, in our case `http://localhost:3000/interact`. If everything has worked as expected on the provider side you should now see the providers authentication page. Authenticate with the provider and they should provide you with the oauth2 tokens.

To retrieve your token call the `oauth-token` function with the keyword for the provider that you specified in your parameter map earlier:
```Clojure
(lmouath/oauth-token :spotify)
Expand Down Expand Up @@ -78,8 +80,6 @@ To remove a provider call the `delete-provider` function with the provider keywo
```Clojure
(lmoauth/delete-provider :spotify)
```
###Exception handling

## License
The MIT License (MIT)

Expand Down

0 comments on commit 9ccfc35

Please sign in to comment.