polycule-connect/polyculeconnect/connector/refuse_all.go
Melora Hugues 74cb316d78
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
feat #43: add CLI commands to manage backends
2023-10-28 16:51:00 +02:00

27 lines
715 B
Go

package connector
import (
"fmt"
"net/http"
"github.com/dexidp/dex/connector"
"github.com/dexidp/dex/pkg/log"
)
const TypeRefuseAll = "refuseAll"
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")
}