2023-09-28 18:18:09 +08:00
|
|
|
package auth
|
2023-06-26 22:38:43 +08:00
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2023-06-27 14:47:25 +08:00
|
|
|
"github.com/grafana/grafana/pkg/plugins/plugindef"
|
2023-06-26 22:38:43 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
type ExternalService struct {
|
|
|
|
ClientID string `json:"clientId"`
|
|
|
|
ClientSecret string `json:"clientSecret"`
|
|
|
|
PrivateKey string `json:"privateKey"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type ExternalServiceRegistry interface {
|
2023-11-13 23:23:11 +08:00
|
|
|
HasExternalService(ctx context.Context, pluginID string) (bool, error)
|
2023-12-04 20:14:21 +08:00
|
|
|
RegisterExternalService(ctx context.Context, pluginID string, pType plugindef.Type, svc *plugindef.IAM) (*ExternalService, error)
|
2023-11-13 20:18:13 +08:00
|
|
|
RemoveExternalService(ctx context.Context, pluginID string) error
|
2023-06-26 22:38:43 +08:00
|
|
|
}
|