Documentation ¶
Overview ¶
Package dex provides specific connectors for the CoreOS/Dex implementation of OpenID Connect protocol
Index ¶
- Variables
- func ConvertUserApiToIdentity(idmUser *idm.User, authSourceName string) (ident connector.Identity)
- func RegisterDexPydioConnector(name string, configProvider func() PydioConnectorConfig)
- func RegisterWrapperConnectorMiddleware(operation string, middleware WrapperConnectorMiddleware)
- type ApiConfig
- type ConnectorConfig
- type ConnectorList
- type PydioConnector
- type PydioConnectorConfig
- type WrapperConfig
- type WrapperConnectorMiddleware
- type WrapperConnectorOperation
- type WrapperConnectorProvider
- func WrapWithIdentity(middleware WrapperConnectorProvider) WrapperConnectorProvider
- func WrapWithIdmUser(middleware WrapperConnectorProvider) WrapperConnectorProvider
- func WrapWithPolicyCheck(middleware WrapperConnectorProvider) WrapperConnectorProvider
- func WrapWithUserLocks(middleware WrapperConnectorProvider) WrapperConnectorProvider
Constants ¶
This section is empty.
Variables ¶
var (
PydioConnectorsConfig = map[string]func() PydioConnectorConfig{}
)
Functions ¶
func RegisterDexPydioConnector ¶
func RegisterDexPydioConnector(name string, configProvider func() PydioConnectorConfig)
func RegisterWrapperConnectorMiddleware ¶ added in v1.2.0
func RegisterWrapperConnectorMiddleware(operation string, middleware WrapperConnectorMiddleware)
RegisterWrapperConnectorMiddleware appends a new connector middleware to the array of already existing middleware for this operation.
Types ¶
type ApiConfig ¶
type ApiConfig struct { }
func (*ApiConfig) OpenConnector ¶
func (c *ApiConfig) OpenConnector(logger logrus.FieldLogger) (interface{}, error)
type ConnectorConfig ¶
type ConnectorList ¶
type ConnectorList struct { Type string `json:"type"` Name string `json:"name"` ID int16 `json:"id"` IsLast bool `json:islast` Connector interface { connector.Connector connector.PasswordConnector connector.RefreshConnector } }
type PydioConnector ¶
type PydioConnector struct { Type string `json:"type"` Name string `json:"name"` ID int16 `json:"id"` IsLast bool `json:islast` Config PydioConnectorConfig `json:"config"` }
PydioConnector is a magical type that can unmarshal YAML dynamically. The Type field determines the connector type, which is then customized for Config.
type PydioConnectorConfig ¶
type PydioConnectorConfig interface {
Open(logger logrus.FieldLogger) (connector.Connector, error)
}
PydioConnectorConfig provides an easy way to return a config struct depending on the connector type.
type WrapperConfig ¶
type WrapperConfig struct {
Connectors []ConnectorConfig `json:"pydioconnectors"`
}
func (*WrapperConfig) Open ¶
func (c *WrapperConfig) Open(logger logrus.FieldLogger) (connector.Connector, error)
func (*WrapperConfig) OpenConnector ¶
func (c *WrapperConfig) OpenConnector(logger logrus.FieldLogger) (interface { connector.Connector connector.PasswordConnector connector.RefreshConnector }, error)
type WrapperConnectorMiddleware ¶ added in v1.2.0
type WrapperConnectorMiddleware func(wrapperConnector WrapperConnectorProvider) WrapperConnectorProvider
type WrapperConnectorOperation ¶ added in v1.2.0
type WrapperConnectorOperation struct { OperationType string Scopes connector.Scopes Login string Password string LoginError bool ValidUsername string AuthSource string User *idm.User Identity connector.Identity }
WrapperConnectorOperation holds all necessary information to perform auth actions using the middleware pattern.
func ApplyWrapperConnectorMiddlewares ¶ added in v1.2.0
func ApplyWrapperConnectorMiddlewares(ctx context.Context, in *WrapperConnectorOperation, coreProvider WrapperConnectorProvider) (*WrapperConnectorOperation, error)
ApplyWrapperConnectorMiddlewares effectively calls each middleware that have been registered for this operation.
type WrapperConnectorProvider ¶ added in v1.2.0
type WrapperConnectorProvider func(ctx context.Context, in *WrapperConnectorOperation) (*WrapperConnectorOperation, error)
func WrapWithIdentity ¶ added in v1.2.0
func WrapWithIdentity(middleware WrapperConnectorProvider) WrapperConnectorProvider
WrapWithIdentity converts the op.User to an identity and stores it in the current operation.
func WrapWithIdmUser ¶ added in v1.2.0
func WrapWithIdmUser(middleware WrapperConnectorProvider) WrapperConnectorProvider
WrapWithIdmUser retrieves an IDM user with her login and adds it to the current operation.
func WrapWithPolicyCheck ¶ added in v1.2.0
func WrapWithPolicyCheck(middleware WrapperConnectorProvider) WrapperConnectorProvider
WrapWithPolicyCheck checks policies for the current user and updates passed operation.
func WrapWithUserLocks ¶ added in v1.2.0
func WrapWithUserLocks(middleware WrapperConnectorProvider) WrapperConnectorProvider
WrapWithUserLocks manages lock after too many fail attemps. It also reset the counter on login success.