friend-oauth2.util
Documentation forthcoming
extract-access-token
(extract-access-token {body :body})Returns the access token from a JSON response body
extract-anti-forgery-token
(extract-anti-forgery-token {session :session})Extracts the anti-csrf state key from the response
format-authn-uri
(format-authn-uri {{:keys [query url]} :authentication-uri} anti-forgery-token)Formats the client authentication uri
format-config-uri
(format-config-uri {{:keys [domain path]} :callback})Formats URI from domain and path pairs in a map
generate-anti-forgery-token
(generate-anti-forgery-token)Generates random string for anti-forgery-token.
get-access-token-from-params
(get-access-token-from-params {body :body})Alternate function to allow retrieve access_token when passed in as form params.
get-domain
(get-domain parsed-url)From a parsed URL object, construct a domain string.
parse-url
(parse-url uri)Parse a URL into the two parts needed by legacy friend-oauth2 code.
replace-authz-code
(replace-authz-code {:keys [query]} code)Formats the token uri with the authorization code