Commit Graph

213 Commits

Author SHA1 Message Date
patrick brisbin
9c8dd98b3d Fixup example 2018-04-21 10:49:05 -04:00
patrick brisbin
98ef5f9aae Update LTS and dependencies
- Latest LTS-11.5
- Allow hoauth2-1.7, needs to be extra-dep though
- Support *and require* yesod-1.6

  This required:

  - Less lifts
  - HandlerFor, WidgetFor, etc
  - Lost MonadThrow, but can use MonadIO instead
2018-04-21 10:49:05 -04:00
patrick brisbin
59c6aec74b
Add clean target 2018-03-27 19:14:01 -04:00
patrick brisbin
66b9b6410e
Version bump 2018-03-27 19:12:31 -04:00
patrick brisbin
b8a6336e55 Disable nightly CI
hoauth2 has been removed from nightly, as have we.
2018-03-27 18:40:26 -04:00
patrick brisbin
dddfbd9f3c Look for and handle OAuth error responses
Closes #106.
2018-03-27 18:40:26 -04:00
patrick brisbin
aa9736b80e Extract errInvalidOAuth 2018-03-27 18:40:26 -04:00
patrick brisbin
07c757aaa5
Version bump 2018-03-09 09:13:04 -05:00
patrick brisbin
d931243bd1 Bump upper-bound on http-types 2018-03-09 09:11:31 -05:00
patrick brisbin
53d57b988b
Verison bump 2018-03-08 11:44:21 -05:00
patrick brisbin
164974525e Raise aeson upper bound 2018-03-08 09:35:55 -05:00
patrick brisbin
8cf5fd1761 Really use the same flags 2018-03-01 12:59:39 -05:00
patrick brisbin
f595aed116 Use the same flags for all builds 2018-03-01 12:59:39 -05:00
patrick brisbin
4b64eb168b Officially drop 7.10 support 2018-03-01 12:59:39 -05:00
patrick brisbin
62eeaa8af1 Add a CI job with default resolver 2018-03-01 12:59:39 -05:00
patrick brisbin
ada3fba748 Bump default resolver 2018-03-01 12:59:39 -05:00
patrick brisbin
dd73fed361
Update CHANGELOG 2018-02-27 12:14:26 -05:00
patrick brisbin
a91f85ff38
Improve error message for invalid Approots
Closes #87
2018-02-13 09:10:04 -05:00
patrick brisbin
34d4d76220 Fix 8.0.2 build 2018-02-13 08:59:01 -05:00
patrick brisbin
5096ca04aa Fix Google Plugin
Scopes need to be separated by space, not +.
2018-02-13 08:59:01 -05:00
patrick brisbin
a7bc7c51e3 Display prettier credentials information 2018-02-13 08:59:01 -05:00
patrick brisbin
72c64102b0 Fix BattleNet interface
- Incorrect indentation
- We should always accept Id/Secret last
- The function is oauth... not oAuth...

Because of the mis-naming, at least we could fix the argument-order in a
backwards-compatible way, deprecating the old function/interface.
2018-02-13 08:59:01 -05:00
patrick brisbin
434263fef3 Tidy up stack.yaml 2018-02-13 08:59:01 -05:00
patrick brisbin
7fe409baa8 Bring back example application
And capture _all_ plugin providers in it.
2018-02-13 08:59:01 -05:00
patrick brisbin
ef38c5c49d Docs tweaks 2018-02-12 09:10:34 -08:00
patrick brisbin
93258d4468 Make extras accessors safer
Even though it's "guaranteed" that values will be present because we set
them, nothing stops end-users from using these functions on Creds values
created by other plugins! Since that seems common, it would be
irresponsible of us to remain so unsafe.
2018-02-12 09:10:34 -08:00
patrick brisbin
a2a49a2c57 Set the ByteString body at userResponse
- It may not be JSON (thought it always is now)
- The JSON suffix should be used only when it is (such as in
  getUserResponseJSON)
2018-02-12 09:10:34 -08:00
patrick brisbin
fccd7a1d66 Update README 2018-02-12 09:10:34 -08:00
patrick brisbin
41eda086a1 Fixup Google documentation 2018-02-12 09:10:34 -08:00
patrick brisbin
794fbbf7e8 Add functions for reading credsExtra 2018-02-12 09:10:34 -08:00
patrick brisbin
32740037e3 Remove unused functions, reduce Prelude interface 2018-02-12 09:10:34 -08:00
patrick brisbin
c586c72df7 Remove extra fields from Upcase 2018-02-12 09:10:34 -08:00
patrick brisbin
6b3c6af895 Remove extras from Spotify 2018-02-12 09:10:34 -08:00
patrick brisbin
e8dc2ec0ec Remove extra fields from Slack 2018-02-12 09:10:34 -08:00
patrick brisbin
09e7c4c786 Remove extra fields from Salesforce 2018-02-12 09:10:34 -08:00
patrick brisbin
8cc250523b DRY up via setExtra
Adds some safety to the stringly-typed keys we're standardizing on.
2018-02-12 09:10:34 -08:00
patrick brisbin
79cd0161d3 Rename qualified import 2018-02-12 09:10:34 -08:00
patrick brisbin
38c2362a98 Remove extra fields from Nylas provider 2018-02-12 09:10:34 -08:00
patrick brisbin
0dd6d6bc3e Remove extra information from Google plugin
Also removes the ability to parse a custom identifier. See the module
documentation for a workaround.
2018-02-12 09:10:34 -08:00
patrick brisbin
98b9f1108d Remove extra information from EveOnline provider
Removed keys:

- charName
- charId
- tokenType
- expires

All can be recovered by re-parsing userResponseJSON.
2018-02-12 09:10:34 -08:00
patrick brisbin
391ef62813 Remove extra fields in Bitbucket provider
New keys:

- accessToken
- userResponseJSON

Removed keys:

- email
- login
- avatar_url
- access_token
- name
- location
2018-02-12 09:10:34 -08:00
patrick brisbin
734c9f464a Remove extra information from BattleNet provider
New keys:

- accessToken
- userResponseJSON

Removed keys:

- battleTag
2018-02-12 09:10:34 -08:00
patrick brisbin
3d4ff8da39 Stop returning extra information in GitHub result
See #71.

New `credsExtra` keys:

- `accessToken`: so you can make your own follow-up requests
- `userResponseJSON`: so you can get more information out of the request
  we already made (you just have to parse it yourself)

Removed keys:

- `access_token`: renamed to `accessToken`
- `avatar_url`: can be re-parsed
- `email`: requires your own request to `/emails`
- `login`: can be re-parsed from `userResponseJSON`
- `location`: can be re-parsed, was not always present
- `name`: can be re-parse, was not not always present
- `public_email`: can be re-parsed, was not not always present

Also re-orders arguments between default and scoped to allow better
partial application -- taking advantage of API breakage already.
2018-02-12 09:10:34 -08:00
patrick brisbin
49542cbca1 Re-structure modules
- Extract ...OAuth2.Dispatch
- Extract ...OAuth2.Prelude
- Reduce ...OAuth2 interface
- Re-export ...OAuth2 from Prelude

Incidental improvements:

- Moves a lot of FromJSON interfaces to withObject which will provide
  better de-serialization errors
- Updates Dispatch code to prepare for fetch-creds functions returning
  either instead of maybe, so we can eventually remove exceptions
  entirely
- Replaces (the potentially information-leaking) 500 on OAuth2-related
  errors with a 403 and logged error
2018-01-27 08:10:55 -05:00
patrick brisbin
82585f9b32 Enable -Wall always 2018-01-27 08:10:55 -05:00
patrick brisbin
257a25e901 Ignore TESTREPORT, used in --rerun testing 2018-01-27 08:10:55 -05:00
patrick brisbin
79be858f44
Correct license information
Fixes #96
2018-01-26 13:58:16 -05:00
patrick brisbin
8283d21997 Skip linting step on 8.0 2018-01-26 12:18:46 -05:00
patrick brisbin
5d59c4e385 Disable 7.10 job for now 2018-01-26 12:18:46 -05:00
patrick brisbin
1c7b377b72 Change cache key strategy
Only look to master- on full-fail, never to "any branch". Use a simple
numeric prefix which we can bump to clear it all.
2018-01-26 12:18:46 -05:00