Commit Graph

397 Commits

Author SHA1 Message Date
patrick brisbin
48a0ea64b2
Fixup 2023-04-06 16:41:29 -04:00
patrick brisbin
4627cf1fdc Hmm 2023-04-06 14:50:52 -04:00
patrick brisbin
940c0fc0a5 Refactor stack matrix
- Use our conventional resolvers by GHC
- Use hoauth2-2.8.0 in nightly, instead of allow-newer-deps
- Document matrix in CI workflow source
2023-04-06 14:50:52 -04:00
Pat Brisbin
3a333df1ce Apply suggestions from code review 2023-04-06 11:19:32 -04:00
Restyled.io
fb1b506606 Restyled by brittany 2023-04-06 11:19:32 -04:00
patrick brisbin
1e68d6b02c Version bump 2023-04-06 11:19:32 -04:00
patrick brisbin
ac1e48db97 Add AzureADv2 plugin
This is the same as the `AzureAD` plugin except:

1. It uses tenant-specific `microsoftonline.com` v2 OAuth2 endpoints
   (hence the name), which means accepting a new Tenant Id argument
2. It uses a space instead of `,` as the scopes separator

Users of multi-tenant apps can provide a Tenant Id of `"common"`. I'm
also not certain if the space-vs-comma scopes separator represents a bug
in the `AzureAD` plugin, or just a difference in the actual v2 APIs.

This inherits the behavior of using email address as the `credIdent`
although this is definitely an `id` field in the User Response. I'm not
sure if there are trade-offs one way or another. Using `id` could mean
transparently handling Azure users changing their email, but I suspect
your identity is implicitly tied to email within Azure anyway, so that
would not be a case we'll ever see.

In the future, we can deprecate the `AzureAD` plugin and suggest users
migrate to this one.
2023-04-06 11:19:32 -04:00
patrick brisbin
8b46e82981 Update CI
- Add concurrency
- Use updated stack-action that caches for itself
- Use haskell/actions HLint actions
- Stop curling a .hlint.yaml, we have one here
2023-04-06 08:43:14 -04:00
patrick brisbin
15a75ff6f9 Fix stack-nightly.yaml 2023-04-06 08:43:14 -04:00
patrick brisbin
d34ed2d4b9 Remove comment that breaks Brittany 2023-04-06 08:43:14 -04:00
patrick brisbin
714467b4d1 Document Example in README 2023-04-06 08:43:14 -04:00
patrick brisbin
514a59e00b White-space 2023-04-06 08:43:14 -04:00
patrick brisbin
33aa6f4c7b Add shellcheck pragma to .env.example 2023-04-06 08:43:14 -04:00
patrick brisbin
8eeca895be Reformat everything with Stylish Haskell 2023-04-06 08:43:14 -04:00
patrick brisbin
d34efc18ca Reformat everything with Brittany 2023-04-06 08:43:14 -04:00
patrick brisbin
e3730ab99c Add brittany.yaml 2023-04-06 08:43:14 -04:00
Michael Gilliland
3c15ecd871
Fix hoauth2 compat for 2.7.0 (#165)
Use CPP to get 2.7.0 to compile

Resolves #164
2023-02-01 14:20:08 -05:00
patrick brisbin
36805f0580
Compile on Stackage Nightly again
- Support for hoauth2-2.6.0 (but not 2.7)
2022-12-15 16:32:09 -05:00
Pat Brisbin
ab73e2fe20
Update README.md 2022-12-15 15:27:07 -05:00
patrick brisbin
6e2ad16663 Version bump 2022-08-18 14:05:48 +00:00
patrick brisbin
d49329d6b9 Fixup CI setup 2022-08-18 14:05:48 +00:00
Restyled.io
e7fa28cefa Restyled by stylish-haskell 2022-08-18 12:49:51 +00:00
Restyled.io
dd4903242a Restyled by brittany 2022-08-18 12:49:51 +00:00
Haisheng W - M
1842441647 address comment: add auth0 to example 2022-08-18 12:49:51 +00:00
Restyled.io
fa25c8ad56 Restyled by stylish-haskell 2022-08-18 12:49:51 +00:00
Restyled.io
d256b221c3 Restyled by brittany 2022-08-18 12:49:51 +00:00
Haisheng W - M
fc49d8aea6 address comment: add oauth2Auth0Host 2022-08-18 12:49:51 +00:00
Restyled.io
46606c12a0 Restyled by stylish-haskell 2022-08-18 12:49:51 +00:00
Restyled.io
e725cecf45 Restyled by brittany 2022-08-18 12:49:51 +00:00
Haisheng W - M
bd5df8e8a5 Adds Auth0 oauth2 plugin 2022-08-18 12:49:51 +00:00
patrick brisbin
e7a9149210
Remove allow-newer from stack-nightly
hoauth2 released a new version with relaxed bounds.
2022-03-28 10:47:54 -04:00
patrick brisbin
e334033e44 Fix on-disk nightly resolver 2022-03-25 11:40:03 -04:00
patrick brisbin
219b5a939f Add nightly on CI
LTS-19 and GHC-9.2 is coming. Adding this to ensure we can compile,
which seems to be the case.

We are only disabled in Stackage because hoauth2 is not ready, for which
I've opened: https://github.com/freizl/hoauth2/issues/142
2022-03-25 11:40:03 -04:00
Barry Moore
77a66fa6e8 Add twitch.tv plugin 2022-03-18 12:08:53 -04:00
patrick brisbin
01ae7319f5 Version bump 2022-03-01 09:21:56 -05:00
patrick brisbin
f5263b01dd Support hoauth2-2.2 and 2.3
This required a lot of CPP refactoring and extension. I plan to shift
our lower bound and target only the newer hoauth2 soon, but I'd like to
get out a compatible version first, which this aims to do.

The comments in Compat.hs try to explain the gymnastics we have to
endure to get there. I'm sorry, it's not ideal.
2022-03-01 09:21:56 -05:00
patrick brisbin
1a59cfd010 Update default resolver to lts-18.26 2022-03-01 09:21:56 -05:00
patrick brisbin
91840cb329
Further relax containers lower bound
This supports the lowest LTS we test with. This was working before
because the bound was only set on publish and not in source, with it in
source it needs to work for all our tested LTSs.
2022-02-03 09:15:40 -05:00
patrick brisbin
4e6665b072
Relax containers lower bound
It seems future resolvers will actually use a lower version of this
package (0.6.4.x) than current LTS (0.6.5.x) for some reason, so using
--pvp-bounds=lower on release is too restrictive for (e.g.) nightly.

Our latest version (0.7.0.0) has had this bound relaxed by revision.
This commit just aligns main and need not be released.
2022-02-03 09:02:31 -05:00
patrick brisbin
206ab951f2
Version bump 2022-01-31 16:06:34 -05:00
Restyled.io
8976e193e9 Restyle
- Restyled by brittany
- Restyled by stylish-haskell
2022-01-31 16:02:35 -05:00
patrick brisbin
9ff675bb32 Configure Restyled 2022-01-31 16:02:35 -05:00
patrick brisbin
8e434df38a Support hoauth2-2.0
The new major version improves the naming of the fields of the OAuth2
record type. This type is central to this library and we leak it freely.

Users who make their own plugins are expected to construct values of
this type to pass into our functions, this makes the new version
disruptive to our code and our users'.

We have two options:

1. Update and release our own new major version

   The major downside is that the current LTS resolver will then not
   update beyond our currently-released version. We have no immediate
   plans for new features in this library, but if we have bugs reported
   to be fixed we would either have to manage a complex backporting or
   ask our Stack users to wait for the next major LTS, which has
   historically been many months.

   Users who wish to use our new version would need to also bring in
   hoauth2, and who knows what else.

2. Release a fully-compatible update

   As mentioned, we leak OAuth2(..) through this library's interface. In
   order to be truly backwards-compatible, we would have to use CCP to
   define an "old style" OAuth2 and use that throughout, such that
   in-the-wild OAuth2 values continue to work as-is.

   This would not be a good long-term solution as it introduces a fair
   amount of naming confusion and will lead to import conflicts for any
   users who also import hoauth2-2.0 modules in the same project.

3. Release a mostly-compatible update

   This is the path this commit explores. We can update our own code to
   be hoauth2-2.0 compatible and use CPP to define the hoauth2-2.0-like
   OAuth2 if we're still on hoauth2-1.x.

   This gets us compiling in either case and "forward functional", with
   the exception of users who define their own plugins (which is rare).

   Because of that use-case, this should technically be a major version
   bump for ourselves (though I'm open to the argument we could treat
   the local-provider use-case differently), however it is still better
   than Option 1 in a few ways:

   - We still compile with hoauth2-1.x, so can be brought in easily as
     an isolated extra-dep
   - If there is a reported bug that we decide to only fix in the newer
     versions, the path for the user is better: they can pull us as an
     extra-dep and likely need no changes. Even if they're doing a
     custom plugin, the required changes are minor
2022-01-31 16:02:35 -05:00
patrick brisbin
b7063dc230 Update GitHub Action to newer patterns 2022-01-31 16:02:35 -05:00
patrick brisbin
342dac80e4
Actually release with no upper bounds 2021-05-13 14:55:32 -04:00
patrick brisbin
c0dbe8366e
Version bump 2021-05-13 14:51:43 -04:00
patrick brisbin
4bc54619e9
Use fixed version of haskell-tag-action 2021-05-13 14:50:57 -04:00
patrick brisbin
cc136ec4cd
Fix release.yml 2021-05-13 14:45:35 -04:00
patrick brisbin
10215d4c14
Remove dependencies upper bounds, version bump 2021-05-13 14:44:25 -04:00
patrick brisbin
3026e1e70d
Tweak release.yml 2021-05-13 14:43:29 -04:00