Commit Graph

437 Commits

Author SHA1 Message Date
patrick brisbin
937ad572a3 Update to LTS-9.5 and hoauth2 1.3.0
The largest changes were around the hoauth2 interface:

The OAuth2 type replaced all of its ByteString fields with either Text
or URI. This is a huge improvement. The fields that are now Text are the
type we had them in anyway. The fields that are now URI are type safe
and easier to manipulate. For example, we were doing very unsafe query
string manipulations looking for raw ? or & values, but now we can work
with tuples in a well-typed property.

Additionally the AccessToken type was upgraded to OAuth2Token with an
accessToken field, and the simple Either ByteString a results were
replaced by a real OAuth2Error type. This required changes to our
InvalidProfileResponse mechanism to support.

To make working with uri-bytestring more convenient, an Extension
library was added with some useful instances and helper functions. This
library may be upstreamed at some point.
2017-10-18 17:21:47 -04:00
patrick brisbin
aeeddcf1c2 Remove stub test 2017-10-18 17:21:47 -04:00
Edward Betts
20dcb234dc correct spelling mistake 2017-09-05 11:59:20 -04:00
patrick brisbin
25e63cdcc2
Version bump 2017-08-03 14:43:35 -04:00
Brian Schroeder
dc70ce8048 Switch to new, safer URL parsing function 2017-08-03 14:22:47 -04:00
Brian Schroeder
de589f8cb6 Update Nylas provider
- Nylas now requires additional parameters for authentication to succeed
- We remove oauth2NylasScoped because it wasn't exported, and Nylas does
  not support any scopes other than "email"
2017-08-03 14:22:47 -04:00
Sid Raval
e756d88e1b Update stack version for Circle CI. 2017-07-21 17:05:18 -04:00
Sid Raval
a942f40eb5 Upgrade stack resolver 2017-07-21 17:05:18 -04:00
Sid Raval
c416ab90d2 HLint 2017-07-20 18:24:31 -04:00
Vladimir Yanovsky
bed6d04384 Add Battle.Net plugin 2017-07-19 19:13:23 -04:00
Paul Rouse
d9ce2d334c Relax upper bounds on aeson and http-client 2017-07-17 11:54:26 -04:00
Dan Palmer
ae7b625c0b Fix code example in Readme 2017-07-17 11:52:38 -04:00
Joe Ferris
1dcbb2dbc1
Bump version 2016-08-26 11:16:44 -04:00
Stefan Parviainen
210264f3e2 Add Bitbucket plugin 2016-08-26 11:10:18 -04:00
Ruslan Babayev
e3b94912f1 add Salesforce plugin
Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
2016-07-27 17:05:29 -07:00
patrick brisbin
491fc566ef
Version bump 2016-07-06 18:36:16 -04:00
Jezen Thomas
327a85fd95
Rename creds key email -> public_email
Partial revert of 64b65ca where this was broken, causing a name
collision in the creds extra association list.
2016-07-06 18:32:46 -04:00
Sergei Trofimovich
c514df2c39 Slack.hs: fix haddock markup
haddock complained thusly:
  Yesod/Auth/OAuth2/Slack.hs:9:1: error:
    parse error on input ‘module’

Signed-off-by: Sergei Trofimovich <siarheit@google.com>
2016-07-02 15:13:38 +01:00
Josh Steiner
535a4a75d7 Bump to version 0.2.0 2016-07-01 11:10:15 -04:00
Joe Ferris
aad8bd88ea Sign in with Slack
https://api.slack.com/docs/sign-in-with-slack
2016-07-01 11:00:14 -04:00
patrick brisbin
e6888e210e
Bump to version 0.1.10 2016-06-24 11:44:05 -04:00
Andrew Darqui
64b65ca4c6
Properly handle empty credsExtra fields
Marks "location" as Maybe in GitHub responses. Without this, users could
experience an InvalidProfileResponse error when missing.

Also fixes cases where fields were Maybe, but the (.:?) combinator was
not being used in the parser.
2016-06-24 11:41:08 -04:00
Joe Ferris
3f204a9ae3
Bump to version 0.1.9 2016-06-09 09:00:58 -04:00
Paul Rouse
120104b534 Relax bound on transformers for GHC 8 2016-06-09 09:00:36 -04:00
Joe Ferris
45e74cd258
Bump version 2016-03-21 14:15:14 -04:00
Kostiantyn Rybnikov
6e940b19e2 Allow aeson 0.11 2016-03-21 18:29:22 +02:00
patrick brisbin
1f23fbf85d
Version bump 2016-02-10 09:54:38 -05:00
patrick brisbin
1d87247537
Add example application 2016-02-10 09:50:51 -05:00
patrick brisbin
f412b7c8f2
Include public_email key in credsExtra for Github 2016-02-10 09:49:57 -05:00
patrick brisbin
29b4a7f4e7
Remove Twitter module
- Twitter does not support OAuth 2[1]

  The motivating issue was created without realizing this (it is a bit
  surprising), and the module that was committed doesn't appear to work.

- For OAuth 1, support[2] already exists

Fixes #25

[1]: https://twittercommunity.com/t/oauth-2-0-support/253
[2]: http://hackage.haskell.org/package/yesod-auth-oauth-1.4.0.2/docs/Yesod-Auth-OAuth.html
2016-02-07 10:37:03 -05:00
silky
631d9a3ca1 Use primary email as email, if one is set.
If we couldn't find a primary email, then use the first email returned from
the list. This fixes #51.
2016-01-26 16:50:19 -05:00
patrick brisbin
2e5ebbb917
Version bump 2016-01-08 14:50:41 -05:00
patrick brisbin
9fcf00f57e
Relax upper bounds so we are stack-compatible
- aeson-0.10
- hoauth2-0.5
- http-types-0.9

Fixes #48
2016-01-08 14:18:57 -05:00
silky
c2794f4040
Add user location
Fixes #49.
2016-01-04 12:34:35 -05:00
patrick brisbin
4317119944
Replace Travis with Circle
We do lose some coverage here. Rather than confirming we build across a
slew of GHC versions, the sdist succeeds, etc, we just run the test
suite against the Stackage snapshot configured. Stackage snapshots is
the direction Haskell is moving, so I think this is an acceptable
simplification.
2016-01-03 10:39:26 -05:00
patrick brisbin
51061fa148
Add stack support
Required upping the cabal lower-bound, which is, I think,
un-controversial since 1.8 is still pretty low.
2016-01-03 10:37:52 -05:00
patrick brisbin
3c24e0ff07
Add basic testing infrastructure
What sort of tests we'll be able to add is yet to be figured out, but
this at least puts a no-op, hspec-based testing target in place.
2016-01-03 10:36:52 -05:00
silky
7354c36e13
Nicer error message when 'code' field missing
Fixes #42
2015-12-07 14:06:58 -05:00
silky
6c16a7458d
Fix source repo link 2015-12-07 14:02:43 -05:00
patrick brisbin
bdc81341e5
Version bump 2015-12-05 00:52:23 -05:00
patrick brisbin
ad561a09d6
Append the state query parameter correctly
If the endpoint URL doesn't yet have any query parameters, this code
would construct an invalid URL by appending `&state=` rather than
`?state=`. We now correctly append `?state=` or `&state=` depending on
the URL already containing a `?` character.

Fixes #44

This is a "good enough" solution for the moment, done for ease of
implementation and speed of delivery. An eventual better solution would
be to use a URL-parsing and constructing library to parse the existing
endpoint, append parameter tuples, and re-construct a new URL.

Restructuring the data types so we start handling real URL and
QueryParam values instead of ByteStrings would also be an option, though
we're a little cornered by the Yesod.Auth.OAuth interface.
2015-11-28 11:42:05 -05:00
patrick brisbin
4afaba6645
Version bump 2015-10-06 23:49:17 -04:00
patrick brisbin
5784f724ba
Bump upper bound on vector to <11
Fixes #40
2015-10-02 21:04:56 -04:00
Brian Schroeder
d3c60bf47c Switch to newer Nylas API endpoint 2015-08-20 15:32:32 -04:00
patrick brisbin
43d15d8478
Version bump 2015-08-12 09:11:33 -04:00
Brian Schroeder
8af444ddb2
Rearrange argument order 2015-08-12 09:08:41 -04:00
Brian Schroeder
62e4260f5c
Wrap lines to 80 characters 2015-08-12 09:08:41 -04:00
Brian Schroeder
815d443464
Implement Nylas provider 2015-08-12 09:08:41 -04:00
Luke Randall
ab71e1be4e Bump upper bounds on aeson 2015-08-12 11:07:15 +02:00
pat brisbin
a4f9dc91f5 Merge pull request #34 from thoughtbot/pb-fixes
Prep for release after Eve Online merge
2015-07-22 12:03:19 -04:00