Commit Graph

8 Commits

Author SHA1 Message Date
patrick brisbin
0b2da5f60f
Docs tweaks 2018-02-07 06:55:02 -08:00
patrick brisbin
b40a405d5a
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-07 06:54:02 -08:00
patrick brisbin
33590c28a4
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-01-28 08:20:48 -05:00
patrick brisbin
cf847ca626
Add functions for reading credsExtra 2018-01-27 12:16:33 -05: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
e8f413ebab Drop support for GHC < 7.10 2018-01-24 08:04:58 -05:00
patrick brisbin
400111f9a0 Restyle imports 2018-01-23 10:16:22 -05:00
patrick brisbin
1d36cb346e Use modern packaging practices
- Move sources under src
- Use hpack via package.yaml
- Remove the network-uri flag
2017-12-14 08:20:16 -05:00