googleoauth

package
v0.0.0-...-c4b140d Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleOAuthService

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

func NewGoogleOAuthService

func NewGoogleOAuthService(opt ...option.ClientOption) (service *GoogleOAuthService, err error)

func (*GoogleOAuthService) GetConfig

func (service *GoogleOAuthService) GetConfig() (config *oauth2.Config)

func (*GoogleOAuthService) GetRedirectUrl

func (service *GoogleOAuthService) GetRedirectUrl(ctx context.Context) (url string, err error)

GetOAuthRedirectUrl returns the url to redirect user to google oauth consent screen

func (*GoogleOAuthService) GetToken

func (service *GoogleOAuthService) GetToken(ctx context.Context, code string) (token *oauth2.Token, err error)

func (*GoogleOAuthService) GetUserInfo

func (service *GoogleOAuthService) GetUserInfo(ctx context.Context, accessToken string) (info *googleOAuth2.Tokeninfo, err error)

func (*GoogleOAuthService) Scopes

func (service *GoogleOAuthService) Scopes() []string

Jump to

Keyboard shortcuts

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