Commit Graph

6 Commits (539f2413c5baaa929f33e534cee4697a9bc124ae)

Author SHA1 Message Date
Jonathan A. Sternberg 18c3c2320e Fix the github oauth2 implementation with multiple emails
If an account had multiple emails, the current implementation would
always select the first one regardless of any other settings. This fixes
it so it only chooses the primary email address that is verified.

This also fixes the generic oauth2 to require verified and primary to be
true if they are present. If they are not present, they are not
required.
2018-04-11 13:27:15 -05:00
Michael Desa b3f917e56c Use github group login for mapping 2018-01-10 16:38:55 -05:00
Michael Desa b5a0080546 Add group to oauth2.Principal 2018-01-10 15:56:13 -05:00
Chris Goller 9c3ffed99e Remove unneeded authenticator from github 2017-02-14 23:09:34 -06:00
Tim Raymond 821552e5f2 Add Name to oauth2.Provider
Providers should be able to tell us their name. This will help construct
routes.
2017-02-14 17:28:05 -05:00
Tim Raymond 09e8063131 Reorganize OAuth2 Logic
Created an oauth2 package which encapsulates all oauth2 providers,
utility functions, types, and interfaces. Previously some methods of the
Github provider were used as http.HandlerFuncs. These have now been
pulled into a concrete type called a JWTMux to implement other Oauth2
providers.

JWTMux has all of the functionality required to take a token from any
provider and store it as a JWT in a browser, and that is the extent of
its responsibilities. It implements the oauth2.Mux interface which would
potentially allow other strategies of oauth2 credential storage.
2017-02-14 16:18:41 -05:00