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