Provider represents an upstream identity provider implementation
| 20 | |
| 21 | // Provider represents an upstream identity provider implementation |
| 22 | type 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 | |
| 35 | func NewProvider(providerConfig options.Provider) (Provider, error) { |
| 36 | providerData, err := newProviderDataFromConfig(providerConfig) |
no outgoing calls
no test coverage detected