2023-09-28 12:18:09 +02:00
|
|
|
package auth
|
2023-06-26 16:38:43 +02:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
|
2024-03-07 11:09:19 +01:00
|
|
|
"github.com/grafana/grafana/pkg/plugins/pfs"
|
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)
|
2024-03-07 11:09:19 +01:00
|
|
|
RegisterExternalService(ctx context.Context, pluginID string, pType pfs.Type, svc *pfs.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
|
|
|
}
|