25 lines
680 B
Go
25 lines
680 B
Go
package connector
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
|
|
"github.com/dexidp/dex/connector"
|
|
"github.com/dexidp/dex/pkg/log"
|
|
)
|
|
|
|
type RefuseAllConfig struct{}
|
|
|
|
func (c *RefuseAllConfig) Open(id string, logger log.Logger) (connector.Connector, error) {
|
|
return &RefuseAllConnector{}, nil
|
|
}
|
|
|
|
type RefuseAllConnector struct{}
|
|
|
|
func (m *RefuseAllConnector) LoginURL(s connector.Scopes, callbackURL, state string) (string, error) {
|
|
return "", fmt.Errorf("You shouldn't use this function")
|
|
}
|
|
|
|
func (m *RefuseAllConnector) HandleCallback(s connector.Scopes, r *http.Request) (identity connector.Identity, err error) {
|
|
return connector.Identity{}, fmt.Errorf("You shouldn't use this function")
|
|
}
|