Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthProviderName ¶
type AuthProviderName string
const (
ProviderGoogle AuthProviderName = "GOOGLE"
)
func NewAuthProviderName ¶
func NewAuthProviderName(provider string) (AuthProviderName, error)
func (AuthProviderName) String ¶
func (a AuthProviderName) String() string
type OIDCProvider ¶
type OIDCProvider interface { GetAuthURL(ctx context.Context, state string) string Exchange(ctx context.Context, code string) (*oauth2.Token, error) Verify(ctx context.Context, token *oauth2.Token) (string, *oidc.IDToken, error) GenerateState() string Client(ctx context.Context, token *oauth2.Token) *http.Client UserInfo(ctx context.Context, code string) (*UserInfo, error) }
func NewOIDCProvider ¶
func NewOIDCProvider( ctx context.Context, providerName AuthProviderName, issuerURL, clientID, clientSecret, redirectURL string, scopes []string, ) (OIDCProvider, error)
func OIDCProviderFactory ¶
func OIDCProviderFactory(ctx context.Context, config *config.Config, providerName AuthProviderName) (OIDCProvider, error)
Click to show internal directories.
Click to hide internal directories.