Documentation ¶
Overview ¶
Package oauth is a wrapper around x/oauth2 to provide oauth2 authetication for various providers
Index ¶
- Constants
- func AddConstProvider(funcs template.FuncMap) template.FuncMap
- func Authenticate(returnTo string, errorHandler func(http.ResponseWriter, *http.Request, error)) func(http.Handler) http.Handler
- func IsValidProvider(provider string) bool
- func Redirect(provider, returnTo string, ...) http.HandlerFunc
- type State
- type User
Constants ¶
View Source
const ( ProviderGoogle = "google" ProviderFacebook = "facebook" )
Variables ¶
This section is empty.
Functions ¶
func Authenticate ¶
func IsValidProvider ¶
func Redirect ¶
func Redirect(provider, returnTo string, errorHandler func(http.ResponseWriter, *http.Request, error)) http.HandlerFunc
Types ¶
type User ¶
type User struct { ID string `json:"id"` Email string `json:"email"` VerifiedEmail bool `json:"verified_email"` Name string `json:"name"` GivenName string `json:"given_name"` FamilyName string `json:"family_name"` Link string `json:"link"` Picture string `json:"picture"` Gender string `json:"gender"` Locale string `json:"locale"` }
Click to show internal directories.
Click to hide internal directories.