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
Brian Schroeder
d3c60bf47c
Switch to newer Nylas API endpoint
2015-08-20 15:32:32 -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
Stefan Dresselhaus
a6fc5ab03d
Add charId to credsExtra
2015-07-22 12:02:15 -04:00
Stefan Dresselhaus
5dcfbea1a0
Add accessToken to credsExtra
2015-07-22 12:02:01 -04:00
patrick brisbin
f3a74cd4b6
Entirely remove unused fields
2015-07-01 11:46:48 -04:00
patrick brisbin
a8396dddf0
Fixes to EveOnline plugin
...
- Fix invalid data declaration
- Fix -Wall compilation warnings
- Unused imports
- Unused functions
- Unused arguments
- Shadowed function name
- Incorporate plain link into WidgetType, remove Maybe
- Use only one function, always accept WidgetType
2015-06-29 10:44:11 -04:00
patrick brisbin
a3d8a6cdd5
Add/fix documentation, change argument order
...
- Document the difference between widget and non-widget functions
- Pass the widget as the first argument to take advantage of partial
application
2015-06-29 10:42:11 -04:00
Stefan Dresselhaus
ce98f1ba4e
got rid of maybe
2015-06-28 18:16:02 +02:00
Stefan Dresselhaus
77db081d6c
changed image-display to widget-display
2015-06-28 18:00:18 +02:00
Stefan Dresselhaus
abd11594d2
indentation to match standards
2015-06-28 17:26:27 +02:00
Stefan Dresselhaus
345bc3e0b0
reverted version bump, removed dependency on time
2015-06-28 17:17:21 +02:00
Stefan Dresselhaus
b9d9b51a6c
Added EVE-Online SSO and made it possible for plugins to use images instead of text-links to login
2015-06-28 00:22:14 +02:00
patrick brisbin
6e904f1be3
Tweak whitespace and alignment
2015-06-25 16:00:43 -04:00
patrick brisbin
c54b2c7ba1
Update haddocks for Google module
2015-06-25 16:00:30 -04:00
Santiago Saavedra
8fa938d7ea
Allow email to be used as an identifier of this module
2015-06-23 20:28:18 +02:00
Santiago Saavedra
1e40d18a09
Fix a linting warning
2015-06-09 17:04:23 +02:00
Santiago Saavedra
192dde89af
Add Google OAuth provider
2015-06-07 18:23:33 +02:00
patrick brisbin
5c5f94dba4
Add Twitter
2015-04-13 17:10:11 -04:00
patrick brisbin
2d3d1d2a8e
Add fromProfileResponse
...
Handles the common case of fetching profile information from a single
JSON endpoint. Throws InvalidProfileResponse if JSON parsing fails.
2015-04-13 17:09:06 -04:00
patrick brisbin
ad0e354b2b
Support GHC 7.10
...
- Conditionally import Control.Applicative
- Enable FlexibleContexts
2015-04-07 12:56:43 -04:00
patrick brisbin
0b0e6c179d
Use consistent style throughout project
...
- Alphabetize imports
- Place qualified imports separate and last
- BL for ByteString.Lazy
- Don't align tokens in tuple lists or record assignments
- Two-space indent for where keyword
- Use record syntax for Creds
- Break before operators in Applicative expressions
- Consistent whitespace throughout
Resolves #19
2015-03-25 16:30:15 -04:00
patrick brisbin
029122f662
Learn rebranded as Upcase
2015-03-24 17:56:59 -04:00
patrick brisbin
085538be7b
Remove Yesod.Auth.OAuth2.Google.hs
...
This functionality is available in yesod-auth, in the
Yesod.Auth.GoogleEmail2 module.
Resolves #18
2015-03-24 17:53:17 -04:00
patrick brisbin
270d1b2eec
Formatting
2015-03-24 17:50:24 -04:00
jprider63
bc320b1397
Move state token handling generic oauth2Plugin
...
Resolves #23
2015-03-24 17:26:35 -04:00
patrick brisbin
646d2b246b
Whitespace
2014-09-22 15:02:32 -04:00
Paul Harper
261cbc30aa
Scopes can now be passed in, most of the spotify user object is returned in the credentials
2014-09-21 23:42:13 -07:00
Paul Harper
a1ff864b4e
Added Spotify as a supported OAuth2 backend
2014-09-20 23:52:23 -07:00
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
Florian Gilcher
3eeae3293d
Expose auth2GithubScoped
...
Expose auth2GithubScoped, allowing users to set the scopes themselves.
2014-09-17 22:31:39 +02: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
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
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
Calen Pennington
7c002e167c
Add a github OAuth2 provider
2014-08-29 20:57:39 +02:00
patrick brisbin
a2647e0ada
Reformat data declaration and comment
...
- Prevents haddock parse error
2014-08-19 17:33:33 -04:00
Kayo Phoenix
d9a41130b0
Version upgrade (hoauth2 0.4.1).
2014-08-13 11:02:46 +06:00
Max Cantor (MBPr)
267bef2c9a
relaxed bounds for ghc 781
2014-04-09 16:59:39 -07: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
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