mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-19 21:29:09 +02:00
get OIDC configuration from proxy flags/env
This commit is contained in:
+9
-5
@@ -58,6 +58,10 @@ type Server struct {
|
||||
GenerateACMECertificates bool
|
||||
ACMEChallengeAddress string
|
||||
ACMEDirectory string
|
||||
OIDCClientId string
|
||||
OIDCClientSecret string
|
||||
OIDCEndpoint string
|
||||
OIDCScopes []string
|
||||
}
|
||||
|
||||
func (s *Server) ListenAndServe(ctx context.Context, addr string) (err error) {
|
||||
@@ -305,11 +309,11 @@ func (s *Server) updateMapping(ctx context.Context, mapping *proto.ProxyMapping)
|
||||
}
|
||||
if mapping.GetAuth().GetOidc() != nil {
|
||||
oidc := mapping.GetAuth().GetOidc()
|
||||
scheme, err := auth.NewOIDC(ctx, mapping.GetId(), mapping.GetAccountId(), auth.OIDCConfig{
|
||||
OIDCProviderURL: oidc.GetOidcProviderUrl(),
|
||||
OIDCClientID: oidc.GetOidcClientId(),
|
||||
OIDCClientSecret: oidc.GetOidcClientSecret(),
|
||||
OIDCScopes: oidc.GetOidcScopes(),
|
||||
scheme, err := auth.NewOIDC(ctx, mapping.GetId(), mapping.GetAccountId(), s.ProxyURL, auth.OIDCConfig{
|
||||
OIDCProviderURL: s.OIDCEndpoint,
|
||||
OIDCClientID: s.OIDCClientId,
|
||||
OIDCClientSecret: s.OIDCClientSecret,
|
||||
OIDCScopes: s.OIDCScopes,
|
||||
DistributionGroups: oidc.GetDistributionGroups(),
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user