Files
grafana/pkg/services/authn/grpcutils/config.go
T
Leonor Oliveira e9ed7223a6 Use authlib repo. Use otel (#103178)
* 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
2025-04-07 15:47:40 +02:00

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),
}
}