Commit Graph

437 Commits

Author SHA1 Message Date
patrick brisbin
60c0f68d5a
Cleanup WordPress plugin
- Explicit exports
- Fixup Haddock formatting
- Brittany & Stylish
- CHANGELOG attribution
2020-08-19 11:17:22 -04:00
nbloomf
40119bd1f3 Update changelog 2020-08-19 10:57:14 -04:00
nbloomf
cc961a0288 Add WordPress.com to .env.example 2020-08-19 10:57:14 -04:00
nbloomf
13b84a8724 Add WordPress.com as an auth provider
Documentation at https://developer.wordpress.com/docs/wpcc/
2020-08-19 10:57:14 -04:00
patrick brisbin
e483abcbc0 Disable nightly builds for now 2020-08-19 10:56:37 -04:00
patrick brisbin
a635a51e8c Fix nightly build 2020-08-19 10:56:37 -04:00
patrick brisbin
0c53b2fcb8 Add nightly target to Makefile 2020-08-19 10:56:37 -04:00
patrick brisbin
e57f90bc2c Simplify Makefile, now that it's not used on CI 2020-08-19 10:56:37 -04:00
patrick brisbin
79c2ab3e93 Include examples in CI builds 2020-08-19 10:56:37 -04:00
patrick brisbin
b1e31e9623 Use stack-nightly in nightly CI build 2020-08-19 10:56:37 -04:00
patrick brisbin
96492707b9 Rewrite CI using stack-build Orb 2020-08-19 10:56:37 -04:00
nbloomf
1576af3fa5 Replace call to fetchAccessToken with fetchAccessToken2
This comment comes from hoauth2:

-- OAuth2 spec allows `client_id` and `client_secret` to
-- either be sent in the header (as basic authentication)
-- OR as form/url params.
-- The OAuth server can choose to implement only one, or both.
-- Unfortunately, there is no way for the OAuth client (i.e. this library) to
-- know which method to use. Please take a look at the documentation of the
-- service that you are integrating with and either use `fetchAccessToken` or `fetchAccessToken2`

`fetchAccessToken2` is a drop-in replacement for `fetchAccessToken` that just adds `client_id` and `client_secret` to the body as form parameters, as permitted by [RFC 6749](https://tools.ietf.org/html/rfc6749#section-2.3.1). Some authorization server implementations only accept client credentials in this form.
2020-07-08 10:15:40 -04:00
nbloomf
0036d5f4e0 Bump version bounds for dependency hoauth2
We're about to replace the call to `fetchAccessToken` from hoauth2 by `fetchAccessToken2`, which was introduced in 1.7.0 and amended in 1.11.0, to allow for oauth2 implementations that expect POST token payloads. Either the initial or the amended version of `fetchAccessToken2` would work for this, but here we've chosen the most conservative working version bump.
2020-07-08 10:15:40 -04:00
nbloomf
b49ccb13aa Add AzureAD to example app 2020-07-08 05:45:27 -04:00
nbloomf
f6b9a28c29 Add GitLab to .env.example 2020-07-08 05:45:27 -04:00
patrick brisbin
036458c7a8 Build Cabal in -j 1 step
Un-cached builds cannot succeed without exhausting memory. Doing fewer
packages concurrently can sometimes resolve this. This is trial and
error.

https://app.circleci.com/jobs/github/thoughtbot/yesod-auth-oauth2/1022
2020-01-27 10:38:32 -05:00
patrick brisbin
b998e03067 Brittany 2019-12-03 20:27:15 -05:00
patrick brisbin
48277d9b8e Compile on nightly/ghc-8.8 2019-12-03 20:27:15 -05:00
patrick brisbin
5528bb9d07
Version bump 2019-08-29 17:23:21 -04:00
patrick brisbin
8436c8ff27 Don't handle unexpected errors with Unknown
This was lazy and resulted in a confusing error experience where a
JSONDecodingError fetching credentials appeared as an Unknown OAuth2
ErrorResponse, making it appear like the OAuth2 provider was indicating
this error to us, instead of it being a simple incorrect parser in our
own code.

ErrorResponse is specifically meant to parse error parameters sent to us
by the OAuth2 provider. They may be user-actionable and can be safely
displayed. This is a very narrow use-case. The Unknown constructor is
required for us to be exhaustive on our string error names, but it
should not be hijacked to store our own errors.

This commit separates and documents the two error scenarios.
2019-08-29 17:21:28 -04:00
patrick brisbin
9c6ac9b59d Fix for weeder and stack-2 2019-08-29 17:21:28 -04:00
patrick brisbin
6fa9748de8 Commit stack.yaml.lock
In version 2, Stack creates this file and it should be checked into
version control to ensure consistent builds across the team, just like a
yarn.lock or Gemfile.lock.
2019-08-29 17:21:28 -04:00
patrick brisbin
4f1de3eb85
Version bump 2019-03-09 09:16:17 -05:00
Chris Beavers
208f497a5a Add AzureAD provider 2019-03-09 09:14:50 -05:00
patrick brisbin
276407071e
Update CHANGELOG 2019-01-09 16:52:07 -05:00
patrick brisbin
653e1f4db6 Upgrade to GHC 8.6.3
No code changes required; only CI:

- Drop 8.2 build
- Add 8.6.3 build
- Update default build to 8.6.3
2019-01-09 16:51:31 -05:00
patrick brisbin
2110b29669
Version bump 2019-01-09 14:00:30 -05:00
patrick brisbin
b775a9c18b
Allow http-client-0.6 2019-01-09 13:59:31 -05:00
patrick brisbin
965d35793d
Version bump, add other-source-files 2018-11-24 14:14:41 -05:00
patrick brisbin
c25fea0e6f
Update CHANGELOG 2018-11-24 14:13:35 -05:00
patrick brisbin
b8befc4811
Remove deprecated Github module 2018-11-24 14:11:44 -05:00
patrick brisbin
b1caafbe24
Version bump 2018-11-24 14:10:33 -05:00
patrick brisbin
644f02d027
Update nightly build 2018-11-24 14:10:33 -05:00
patrick brisbin
7445bccb8a
Relax upper bounds 2018-11-24 14:10:33 -05:00
chromezh
57c767d04e Fix a link in package.yaml
The `.git` is redundant because on hackage the link of Bug tracker would be `https://github.com/thoughtbot/yesod-auth-oauth2.git/issues` and it is not a valid link.
2018-11-12 09:14:10 -05:00
patrick brisbin
77eaa8eb96
Update stack-nightly.yaml
Most of the things are back in now, it seems.
2018-10-24 09:15:54 -04:00
patrick brisbin
e20891c072
Tweak make targets and CI steps 2018-10-24 09:15:45 -04:00
patrick brisbin
d93594bf97
Typos and grammar in README 2018-10-24 08:54:34 -04:00
patrick brisbin
c0a6f11a87
Update GitHub module in README 2018-10-24 08:52:02 -04:00
patrick brisbin
569a85429a
Fix nightly build 2018-10-08 09:36:55 -04:00
patrick brisbin
46dfc1232a
Version bump 2018-09-19 08:02:27 -04:00
patrick brisbin
1411bb5858 Implement different exceptions for different cases
I had hoped to get away from this entirely, to an Either-based
interface, but that seems to be stalling as an initiative. So in the
meantime, let's at least make our exceptions more meaningful.
2018-09-19 07:55:38 -04:00
patrick brisbin
e3c61789ba Ensure we rescue our exceptions too
For some reason, I thought tryIO would catch our own exception is we
threw them via throwIO, but that's incorrect. Our own exceptions are not
IOExceptions, so they squeak by. This fixes that.
2018-09-18 17:25:00 -04:00
patrick brisbin
dc033e1331 Move Exception to its own module
This will avoid cycles later.
2018-09-18 17:25:00 -04:00
patrick brisbin
37343fa533 Redirect on OAuth2 errors, not permissionDenied 2018-09-18 17:25:00 -04:00
patrick brisbin
92beb4b4b4 Brittany 2018-09-18 17:25:00 -04:00
patrick brisbin
4fd868e3ae Ensure stack version and stack-yaml are in digest 2018-09-11 08:00:30 -04:00
patrick brisbin
f1cf1d82ab Disable linting on nightly 2018-09-11 08:00:30 -04:00
patrick brisbin
2f0c6ed4dd Always upgrade Stack 2018-09-11 08:00:30 -04:00
patrick brisbin
17cbf543ae Use a more minimal build image 2018-09-11 08:00:30 -04:00