polycule-connect/polyculeconnect/connector/refuse_all.go

35 lines
896 B
Go

package connector
import (
"fmt"
"net/http"
"github.com/dexidp/dex/connector"
"github.com/dexidp/dex/pkg/log"
"github.com/dexidp/dex/storage"
)
const TypeRefuseAll = "refuseAll"
var RefuseAllConnectorConfig storage.Connector = storage.Connector{
ID: "null",
Name: "RefuseAll",
Type: TypeRefuseAll,
Config: nil,
}
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")
}