ddellacosta/friend-oauth2 — pull request #25 by stuarth (2014-06-29 02:37:51+00:00)
Title: optionally parse refresh tokens from authorization code exchange

`workflow/request-token` can be passed a `response-parse-fn` (superceding
`access-token-parsefn`), allowing values in addition to the access token to be parsed (e.g. refresh token). For example, for google’s oauth2

```clojure
(def friend-config
{:allow-anon? true
:workflows [(oauth2/workflow
{:client-config client-config
:uri-config uri-config
:credential-fn credential-fn
:response-parse-fn
(fn [req]
(when-let [response
(some-> req :body (parse-string true))]
{:access-token (:access_token response)
:refresh-token (:refresh_token response)}))})]})
```

`response-parse-fn` should return a map containing parsed vals. Addresses #20