google

package
v0.0.0-...-79ce300 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const UserInfoAPIEndpoint = "https://www.googleapis.com/oauth2/v3/userinfo"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *config.Config) *Client

func (*Client) OAuthCallback

func (c *Client) OAuthCallback(ctx context.Context, code string) (*OAuthCallbackResponse, error)

func (*Client) OAuthRedirectURL

func (c *Client) OAuthRedirectURL(state string) string

type OAuthCallbackResponse

type OAuthCallbackResponse struct {
	AccessToken  string
	RefreshToken string
	TokenType    string
	Expiry       time.Time

	Email   string
	Picture string
}

Jump to

Keyboard shortcuts

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