google

package
v0.0.0-...-1c246ab Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleAdapter

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

GoogleAdapter is an adapter for Google OAuth2.

func NewGoogleAdapter

func NewGoogleAdapter(clientID, clientSecret, redirectURL string) *GoogleAdapter

NewGoogleAdapter creates a new GoogleAdapter with the given client configuration.

func (*GoogleAdapter) ExchangeCodeForToken

func (g *GoogleAdapter) ExchangeCodeForToken(code string) (*model.TokenResponse, error)

ExchangeCodeForToken exchanges an authorization code for tokens.

func (*GoogleAdapter) GetAuthURL

func (g *GoogleAdapter) GetAuthURL(state string) string

GetAuthURL generates the Google OAuth2 authorization URL.

func (*GoogleAdapter) GetRedirectURL

func (g *GoogleAdapter) GetRedirectURL() string

GetRedirectURL returns the redirect URL configured for the Google OAuth2 provider.

func (*GoogleAdapter) GetRefreshToken

func (m *GoogleAdapter) GetRefreshToken(refreshToken string) (*model.TokenResponse, error)

Get Refresh Token

Jump to

Keyboard shortcuts

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