Documentation ¶
Overview ¶
View functions for OAUTH
Index ¶
- type Views
- func (v *Views) Logout(c web.C, w http.ResponseWriter, r *http.Request)
- func (v *Views) OauthCallback(c web.C, w http.ResponseWriter, r *http.Request)
- func (v *Views) StartLogin(c web.C, w http.ResponseWriter, r *http.Request)
- func (v *Views) StartLoginURL(c web.C, w http.ResponseWriter, r *http.Request, providerName string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Views ¶
type Views struct {
// contains filtered or unexported fields
}
func (*Views) Logout ¶
Logout deletes the current session
Add a 'next' url parameter to control where the user is redirected to after logout.
func (*Views) OauthCallback ¶
When the OAUTH service is done it redirects the user to this view with a temporary code that it can exchange for an OAUTH token. It then calls the provider to get identifying information for the user.
func (*Views) StartLogin ¶
StartLogin kicks off the OAUTH process.
Add a 'next' url parameter to control where the user is redirected to after a successful login.
func (*Views) StartLoginURL ¶
func (v *Views) StartLoginURL(c web.C, w http.ResponseWriter, r *http.Request, providerName string) string
StartLoginURL returns the URL to redirect to to start the OAUTH process. It also alters the session to hold login info, and updates cookies on the response. This is used when you need to redirect to the OAUTH URL via "unconventional" means - as for Shopify embedded apps