oauthmanager

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 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"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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