MCPcopy
hub / github.com/oauth2-proxy/oauth2-proxy / Provider

Interface Provider

providers/providers.go:22–33  ·  view source on GitHub ↗

Provider represents an upstream identity provider implementation

Source from the content-addressed store, hash-verified

20
21// Provider represents an upstream identity provider implementation
22type Provider interface {
23 Data() *ProviderData
24 GetLoginURL(redirectURI, finalRedirect, nonce string, extraParams url.Values) string
25 Redeem(ctx context.Context, redirectURI, code, codeVerifier string) (*sessions.SessionState, error)
26 // Deprecated: Migrate to EnrichSession
27 GetEmailAddress(ctx context.Context, s *sessions.SessionState) (string, error)
28 EnrichSession(ctx context.Context, s *sessions.SessionState) error
29 Authorize(ctx context.Context, s *sessions.SessionState) (bool, error)
30 ValidateSession(ctx context.Context, s *sessions.SessionState) bool
31 RefreshSession(ctx context.Context, s *sessions.SessionState) (bool, error)
32 CreateSessionFromToken(ctx context.Context, token string) (*sessions.SessionState, error)
33}
34
35func NewProvider(providerConfig options.Provider) (Provider, error) {
36 providerData, err := newProviderDataFromConfig(providerConfig)

Callers 61

NewOAuthProxyFunction · 0.95
TestScopeFunction · 0.95
buildProviderNameFunction · 0.65
backendLogoutMethod · 0.65
doOAuthStartMethod · 0.65
testDigitalOceanProviderFunction · 0.65
doOAuthStartMethod · 0.65

Implementers 1

ProviderDataproviders/provider_data.go

Calls

no outgoing calls

Tested by

no test coverage detected