mirror of https://github.com/dexidp/dex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
951 B
37 lines
951 B
package connector |
|
|
|
import ( |
|
"html/template" |
|
"net/http" |
|
"net/url" |
|
|
|
"github.com/coreos/go-oidc/oidc" |
|
"github.com/coreos/pkg/health" |
|
) |
|
|
|
type Connector interface { |
|
ID() string |
|
LoginURL(sessionKey, prompt string) (string, error) |
|
Register(mux *http.ServeMux, errorURL url.URL) |
|
|
|
// Sync triggers any long-running tasks needed to maintain the |
|
// Connector's operation. For example, this would encompass |
|
// repeatedly caching any remote resources for local use. |
|
Sync() chan struct{} |
|
|
|
// TrustedEmailProvider indicates whether or not we can trust that email claims coming from this provider. |
|
TrustedEmailProvider() bool |
|
|
|
health.Checkable |
|
} |
|
|
|
//go:generate genconfig -o config.go connector Connector |
|
type ConnectorConfig interface { |
|
ConnectorID() string |
|
ConnectorType() string |
|
Connector(ns url.URL, loginFunc oidc.LoginFunc, tpls *template.Template) (Connector, error) |
|
} |
|
|
|
type ConnectorConfigRepo interface { |
|
All() ([]ConnectorConfig, error) |
|
}
|
|
|