Documentation ¶
Overview ¶
Package oauth provides the integration with Google OAuth.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHttpRequestUserId ¶
Return userId stored in Context associated with this session.
Types ¶
type GoogleConfig ¶
type Provider ¶
type Provider interface { Login(successURL string) http.Handler Callback() http.Handler Logout() http.Handler RequireLogin(h http.Handler, allowToken bool) http.Handler UpdateCreds(clientId, secret, redirect string) HasCreds() bool }
Provider interface implements the functions necessary for OAuth authentication.
func NewGoogle ¶
func NewGoogle(cfg GoogleConfig) Provider
Return a new instance of a Google OAuth Provider. This implementation maintains a session stored in an encrypted cookie using gorilla/securecookie.
Click to show internal directories.
Click to hide internal directories.