google_provider

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

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

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 (*GoogleOauth2Client) Login

func (*GoogleOauth2Client) Logout

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL