yesod-auth-oauth2/src
patrick brisbin 53ae79f708
Support injecting fetchAccessToken
hoauth2's fetchAccessToken provides credentials in the Authorization
header, while fetchAccessToken2 provides them in that header but also
the POST body.

It was discovered that some providers only support one or the other, so
using fetchAccessToken2 would be preferred since it should work with
either. This happened in #129.

However, we discovered at least one provider (Okta) that actively
rejects requests unless they're supplying credentials in exactly one
place:

    Cannot supply multiple client credentials. Use one of the following:
    credentials in the Authorization header, credentials in the post
    body, or a client_assertion in the post body."

This patch reverts back to fetchAccessToken, but makes it possible to
for client to use fetchAccessToken2 if necessary via alternative
functions.
2020-12-10 11:21:12 -05:00
..
URI/ByteString Add GitLab support 2018-07-29 09:45:00 -04:00
Yesod/Auth Support injecting fetchAccessToken 2020-12-10 11:21:12 -05:00