Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OAuth2Provider ¶
type OAuth2Provider interface { GetAuthURL(state string) string ExchangeCodeForToken(code string) (*model.TokenResponse, error) GetRedirectURL() string GetRefreshToken(refreshToken string) (*model.TokenResponse, error) }
OAuth2Provider defines the interface for OAuth2 operations.
func NewOAuth2Provider ¶
func NewOAuth2Provider(providerType ProviderType, tenantID, clientID, clientSecret, redirectURL string) (OAuth2Provider, error)
NewOAuth2Provider creates a new OAuth2 provider adapter based on the given provider type.
type ProviderType ¶
type ProviderType string
ProviderType represents the supported OAuth2 providers.
const ( GoogleProvider ProviderType = "google" MicrosoftProvider ProviderType = "microsoft" )
Click to show internal directories.
Click to hide internal directories.