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
Click to show internal directories.
Click to hide internal directories.