Documentation
¶
Index ¶
- Constants
- func Register(options adapters.OAuth2ProviderOptions) (adapters.OAuth2Provider, error)
- type GoogleOauth2Client
- func (c *GoogleOauth2Client) AppendScope(scope string)
- func (c *GoogleOauth2Client) Callback() controllers.Controller
- func (c *GoogleOauth2Client) Login() controllers.Controller
- func (c *GoogleOauth2Client) Logout() controllers.Controller
- func (c *GoogleOauth2Client) Name() string
- func (c *GoogleOauth2Client) RemoveScope(scope string)
- func (c *GoogleOauth2Client) Scopes() []string
- func (c *GoogleOauth2Client) SetErrorCallback(f func(*adapters.OAuth2CallbackResponse) error)
- func (c *GoogleOauth2Client) SetErrorRedirectPath(path string)
- func (c *GoogleOauth2Client) SetLoggedInCallback(f func(*adapters.OAuth2CallbackResponse) error)
- func (c *GoogleOauth2Client) SetLoggedInRedirectPath(path string)
- func (c *GoogleOauth2Client) SetLoggedOutCallback(f func(*adapters.OAuth2CallbackResponse) error)
- func (c *GoogleOauth2Client) SetLoggedOutInRedirectPath(path string)
- func (c *GoogleOauth2Client) ToggleErrorRedirect(value bool)
- func (c *GoogleOauth2Client) ToggleSuccessRedirect(value bool)
Constants ¶
View Source
const ( GOOGLE_OAUTH_PROFILE_API_URL = "https://www.googleapis.com/oauth2/v2/userinfo" GOOGLE_DEFAULT_CLIENT_NAME = "google" GOOGLE_CALLBACK_ENDPOINT = "callback" )
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(options adapters.OAuth2ProviderOptions) (adapters.OAuth2Provider, error)
Types ¶
type GoogleOauth2Client ¶
type GoogleOauth2Client struct { RedirectOnSuccess bool RedirectOnError bool LoggedInCallback func(*adapters.OAuth2CallbackResponse) error LoggedOutCallback func(*adapters.OAuth2CallbackResponse) error ErrorCallback func(*adapters.OAuth2CallbackResponse) error // contains filtered or unexported fields }
func New ¶
func New(clientId string, clientSecret string) *GoogleOauth2Client
func (*GoogleOauth2Client) AppendScope ¶
func (c *GoogleOauth2Client) AppendScope(scope string)
func (*GoogleOauth2Client) Callback ¶
func (c *GoogleOauth2Client) Callback() controllers.Controller
func (*GoogleOauth2Client) Login ¶
func (c *GoogleOauth2Client) Login() controllers.Controller
func (*GoogleOauth2Client) Logout ¶
func (c *GoogleOauth2Client) Logout() controllers.Controller
func (*GoogleOauth2Client) Name ¶
func (c *GoogleOauth2Client) Name() string
func (*GoogleOauth2Client) RemoveScope ¶
func (c *GoogleOauth2Client) RemoveScope(scope string)
func (*GoogleOauth2Client) Scopes ¶
func (c *GoogleOauth2Client) Scopes() []string
func (*GoogleOauth2Client) SetErrorCallback ¶
func (c *GoogleOauth2Client) SetErrorCallback(f func(*adapters.OAuth2CallbackResponse) error)
func (*GoogleOauth2Client) SetErrorRedirectPath ¶
func (c *GoogleOauth2Client) SetErrorRedirectPath(path string)
func (*GoogleOauth2Client) SetLoggedInCallback ¶
func (c *GoogleOauth2Client) SetLoggedInCallback(f func(*adapters.OAuth2CallbackResponse) error)
func (*GoogleOauth2Client) SetLoggedInRedirectPath ¶
func (c *GoogleOauth2Client) SetLoggedInRedirectPath(path string)
func (*GoogleOauth2Client) SetLoggedOutCallback ¶
func (c *GoogleOauth2Client) SetLoggedOutCallback(f func(*adapters.OAuth2CallbackResponse) error)
func (*GoogleOauth2Client) SetLoggedOutInRedirectPath ¶
func (c *GoogleOauth2Client) SetLoggedOutInRedirectPath(path string)
func (*GoogleOauth2Client) ToggleErrorRedirect ¶
func (c *GoogleOauth2Client) ToggleErrorRedirect(value bool)
func (*GoogleOauth2Client) ToggleSuccessRedirect ¶
func (c *GoogleOauth2Client) ToggleSuccessRedirect(value bool)
Click to show internal directories.
Click to hide internal directories.