googleAuth

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleOauthConfig

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

func New

func New() *GoogleOauthConfig

func NewGoogleOauthConfig

func NewGoogleOauthConfig(clientId, clientSecret, redirectUrl string) *GoogleOauthConfig

func (*GoogleOauthConfig) AuthCodeUrl

func (t *GoogleOauthConfig) AuthCodeUrl(state string, opts ...oauth2.AuthCodeOption) (url string)

func (*GoogleOauthConfig) Exchange

func (t *GoogleOauthConfig) Exchange(ctx context.Context, code string) (*oauth2.Token, error)

func (*GoogleOauthConfig) Response

func (t *GoogleOauthConfig) Response(accessToken string) (*UserInfo, error)

type UserInfo

type UserInfo struct {
	Id            string `json:"id"`
	Email         string `json:"email"`
	Name          string `json:"name"`
	GivenName     string `json:"given_name"`
	FamilyName    string `json:"family_name"`
	Picture       string `json:"picture"`
	Locale        string `json:"locale"`
	VerifiedEmail bool   `json:"verified_email"`
}

user info

Jump to

Keyboard shortcuts

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