Documentation ¶
Overview ¶
Package upstreamoidc implements an abstraction of upstream OIDC provider interactions.
Index ¶
- func New(config *oauth2.Config, provider *coreosoidc.Provider, client *http.Client) provider.UpstreamOIDCIdentityProviderI
- type ProviderConfig
- func (p *ProviderConfig) ExchangeAuthcodeAndValidateTokens(ctx context.Context, authcode string, pkceCodeVerifier pkce.Code, ...) (*oidctypes.Token, error)
- func (p *ProviderConfig) GetAuthorizationURL() *url.URL
- func (p *ProviderConfig) GetClientID() string
- func (p *ProviderConfig) GetGroupsClaim() string
- func (p *ProviderConfig) GetName() string
- func (p *ProviderConfig) GetScopes() []string
- func (p *ProviderConfig) GetUsernameClaim() string
- func (p *ProviderConfig) ValidateToken(ctx context.Context, tok *oauth2.Token, expectedIDTokenNonce nonce.Nonce) (*oidctypes.Token, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(config *oauth2.Config, provider *coreosoidc.Provider, client *http.Client) provider.UpstreamOIDCIdentityProviderI
Types ¶
type ProviderConfig ¶
type ProviderConfig struct { Name string UsernameClaim string GroupsClaim string Config *oauth2.Config Provider interface { Verifier(*coreosoidc.Config) *coreosoidc.IDTokenVerifier UserInfo(ctx context.Context, tokenSource oauth2.TokenSource) (*coreosoidc.UserInfo, error) } Client *http.Client }
ProviderConfig holds the active configuration of an upstream OIDC provider.
func (*ProviderConfig) ExchangeAuthcodeAndValidateTokens ¶
func (*ProviderConfig) GetAuthorizationURL ¶
func (p *ProviderConfig) GetAuthorizationURL() *url.URL
func (*ProviderConfig) GetClientID ¶
func (p *ProviderConfig) GetClientID() string
func (*ProviderConfig) GetGroupsClaim ¶
func (p *ProviderConfig) GetGroupsClaim() string
func (*ProviderConfig) GetName ¶
func (p *ProviderConfig) GetName() string
func (*ProviderConfig) GetScopes ¶
func (p *ProviderConfig) GetScopes() []string
func (*ProviderConfig) GetUsernameClaim ¶
func (p *ProviderConfig) GetUsernameClaim() string
Click to show internal directories.
Click to hide internal directories.