e9ed7223a6
* Use authlib repo. Use otel * Use interceptors on the provider level * Create a new wire set with otel * Lint * Fix test * make update-workflow * make update-workspace * make update-workspace. Try to add authlib as enterprise imports * make update-workspace
22 lines
564 B
Go
22 lines
564 B
Go
package grpcutils
|
|
|
|
import (
|
|
"github.com/grafana/grafana/pkg/setting"
|
|
)
|
|
|
|
type GrpcClientConfig struct {
|
|
Token string
|
|
TokenExchangeURL string
|
|
TokenNamespace string
|
|
}
|
|
|
|
func ReadGrpcClientConfig(cfg *setting.Cfg) *GrpcClientConfig {
|
|
section := cfg.SectionWithEnvOverrides("grpc_client_authentication")
|
|
|
|
return &GrpcClientConfig{
|
|
Token: section.Key("token").MustString(""),
|
|
TokenExchangeURL: section.Key("token_exchange_url").MustString(""),
|
|
TokenNamespace: section.Key("token_namespace").MustString("stacks-" + cfg.StackID),
|
|
}
|
|
}
|