Commit Graph

437 Commits

Author SHA1 Message Date
Florian Gilcher
81ece8072f Make Github name optional
The github API returns no name field if the user has given none (and
only goes by their user handle). For that reason, make the name field
optional.
2014-09-18 11:40:12 +02:00
patrick brisbin
d2e384c1aa
Version bump 2014-09-17 22:19:56 -04:00
pat brisbin
1ab10c3dae Merge pull request #11 from skade/expose-github-scope
Expose auth2GithubScoped
2014-09-17 22:19:20 -04:00
Florian Gilcher
3eeae3293d Expose auth2GithubScoped
Expose auth2GithubScoped, allowing users to set the scopes themselves.
2014-09-17 22:31:39 +02:00
patrick brisbin
4b2d7e333c
Larger version bump 2014-09-13 16:47:04 -04:00
patrick brisbin
eb5f9488f8
Address compiler warnings
- user was defined by never used in the no mails case
- The result of apDispatch is discarded
2014-09-13 16:45:36 -04:00
pat brisbin
3b2aeed871 Merge pull request #10 from freiric/github-provider
Github provider
2014-09-13 16:44:13 -04:00
Freiric Barral
8046f4d8cc hardcode the scope to user:email (if more info is needed the code will anyway have to be changed to include more queries) 2014-08-31 23:11:41 +02:00
Freiric Barral
a992fdb6fa fetch github email in a second query to https://api.github.com/user/emails (the query to https://api.github.com/user return a null in the email field) 2014-08-31 23:11:41 +02:00
Freiric Barral
e34156dcc3 bump version 2014-08-31 23:11:41 +02:00
Freiric Barral
4fdd311d4b correct typo in the authentication query to github 2014-08-31 23:11:36 +02:00
Freiric Barral
d6fe3090d7 remove redundant bracket 2014-08-29 21:04:45 +02:00
Freiric Barral
165713c350 use tls manager argument in fetchGithubProfile (introduced in 'Version upgrade (hoauth2 0.4.1)'.) 2014-08-29 21:04:21 +02:00
Freiric Barral
ec80c8f75e fix cabal file: take into account the split of network from version 2.6,
and avoid authenticate 1.3.2.6 which gave the following strange error:
...
Building authenticate-1.3.2.6...
Preprocessing library authenticate-1.3.2.6...
[1 of 9] Compiling OpenId2.XRDS     ( OpenId2/XRDS.hs, dist/dist-sandbox-a1429708/build/OpenId2/XRDS.o )
[2 of 9] Compiling Web.Authenticate.OpenId.Providers ( Web/Authenticate/OpenId/Providers.hs, dist/dist-sandbox-a1429708/build/Web/Authenticate/OpenId/Providers.o )
[3 of 9] Compiling Web.Authenticate.BrowserId ( Web/Authenticate/BrowserId.hs, dist/dist-sandbox-a1429708/build/Web/Authenticate/BrowserId.o )

Web/Authenticate/BrowserId.hs:15:22:
    Module ‘Data.Conduit’ does not export ‘MonadBaseControl’

Web/Authenticate/BrowserId.hs:15:40:
    Module ‘Data.Conduit’ does not export ‘MonadResource’
Failed to install authenticate-1.3.2.6
2014-08-29 20:57:39 +02:00
Calen Pennington
7c002e167c Add a github OAuth2 provider 2014-08-29 20:57:39 +02:00
Calen Pennington
393334370c Update to hauth2 0.4.* 2014-08-29 20:57:34 +02:00
patrick brisbin
1d115720fc
Bump version 2014-08-19 17:35:36 -04:00
patrick brisbin
a2647e0ada
Reformat data declaration and comment
- Prevents haddock parse error
2014-08-19 17:33:33 -04:00
patrick brisbin
bcdbf1b48a
Fix lower bound on yesod-auth 2014-08-17 12:10:09 -04:00
scan
67590fc758 Merge pull request #9 from katyo/master
Version upgrade (hoauth2 0.4.1)
2014-08-13 22:13:02 +02:00
Kayo Phoenix
d9a41130b0 Version upgrade (hoauth2 0.4.1). 2014-08-13 11:02:46 +06:00
scan
961ec96a0b Merge pull request #7 from docmunch/mc-ghc-7.8.1
I'll pull this in for now.
2014-08-09 21:16:05 +02:00
Max Cantor (MBPr)
267bef2c9a relaxed bounds for ghc 781 2014-04-09 16:59:39 -07:00
patrick brisbin
a306f80da8 Loosen contraints on lifted-base and text 2014-02-21 14:20:35 -05:00
patrick brisbin
c635bc7fd1 Bump version 2014-02-21 12:26:48 -05:00
patrick brisbin
4354dc630a Replace call to error with throwIO. Fixes #2
* error would crash the server
* IO exception should result in a 500
2014-02-21 12:25:31 -05:00
patrick brisbin
257968f067 Fix documentation error 2014-02-21 11:00:57 -05:00
patrick brisbin
3c3c8f019d Add content to README 2014-02-20 15:47:05 -05:00
scan
5c5f2eb613 Merge pull request #1 from pbrisbin/master
Updates, fixes - request to maintain
2014-02-18 12:49:11 +01:00
patrick brisbin
4b6cb31ba9 Typos 2014-02-15 16:05:59 -05:00
patrick brisbin
7536e7f25f Refactor to separate modules, document things
* oauth2 functions now handle the getCreds argument themselves
* Learn is updated to do the Right Thing
* Google is unfinished
2014-02-15 15:56:15 -05:00
patrick brisbin
1ea281b4b1 Minor refactor 2014-02-15 15:23:58 -05:00
patrick brisbin
4ec390e32a Use Network.OAuth.OAuth2
* Provides basically the same interface
* Re-export it for making additional requests
2014-02-15 15:11:03 -05:00
patrick brisbin
434e2bc092 Update dependencies, make it work, address -Wall
Housekeeping:

* Use newer http-conduit (Request m becomes Request)
* Increase upper bound on aeson
* Fix whitespace, remove unfinished function
* Add type signatures and some comments
* Remove unused imports

Fixes:

* ByteString needs an orphan JSON instance so AccessToken can have one.
  I'm not sure if there's a way around this.
* redirect takes a Text, not a ByteString
* dispatch for "callback" should handle setting the credentials

Additions

* oauth2Learn for authenticating against learn.thoughtbot.com
2014-02-15 14:44:01 -05:00
Tom Streller
6d3bd0f281 Add json request 2013-07-15 11:43:28 +02:00
Tom Streller
d966f17704 require getCreds method 2013-07-14 14:14:31 +02:00
Tom Streller
3457bfd3a0 Initial import 2013-07-14 11:11:44 +02:00