From 052525093a9572b080ee394d041902245c66d5d9 Mon Sep 17 00:00:00 2001 From: Maycon Santos Date: Fri, 29 Nov 2024 00:09:54 +0100 Subject: [PATCH] add missing static info --- client/android/login.go | 6 +++--- client/ios/NetBirdSDK/login.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/android/login.go b/client/android/login.go index bb61edfa8..fcfee9eb4 100644 --- a/client/android/login.go +++ b/client/android/login.go @@ -131,7 +131,7 @@ func (a *Auth) loginWithSetupKeyAndSaveConfig(setupKey string, deviceName string ctxWithValues := context.WithValue(a.ctx, system.DeviceNameCtxKey, deviceName) err := a.withBackOff(a.ctx, func() error { - backoffErr := internal.Login(ctxWithValues, a.config, setupKey, "") + backoffErr := internal.Login(ctxWithValues, a.config, setupKey, "", &system.StaticInfo{}) if s, ok := gstatus.FromError(backoffErr); ok && (s.Code() == codes.PermissionDenied) { // we got an answer from management, exit backoff earlier return backoff.Permanent(backoffErr) @@ -162,7 +162,7 @@ func (a *Auth) login(urlOpener URLOpener) error { // check if we need to generate JWT token err := a.withBackOff(a.ctx, func() (err error) { - needsLogin, err = internal.IsLoginRequired(a.ctx, a.config.PrivateKey, a.config.ManagementURL, a.config.SSHKey) + needsLogin, err = internal.IsLoginRequired(a.ctx, a.config.PrivateKey, a.config.ManagementURL, a.config.SSHKey, &system.StaticInfo{}) return }) if err != nil { @@ -179,7 +179,7 @@ func (a *Auth) login(urlOpener URLOpener) error { } err = a.withBackOff(a.ctx, func() error { - err := internal.Login(a.ctx, a.config, "", jwtToken) + err := internal.Login(a.ctx, a.config, "", jwtToken, &system.StaticInfo{}) if s, ok := gstatus.FromError(err); ok && (s.Code() == codes.InvalidArgument || s.Code() == codes.PermissionDenied) { return nil } diff --git a/client/ios/NetBirdSDK/login.go b/client/ios/NetBirdSDK/login.go index ff637edd4..8a13911dc 100644 --- a/client/ios/NetBirdSDK/login.go +++ b/client/ios/NetBirdSDK/login.go @@ -104,7 +104,7 @@ func (a *Auth) LoginWithSetupKeyAndSaveConfig(setupKey string, deviceName string ctxWithValues := context.WithValue(a.ctx, system.DeviceNameCtxKey, deviceName) err := a.withBackOff(a.ctx, func() error { - backoffErr := internal.Login(ctxWithValues, a.config, setupKey, "") + backoffErr := internal.Login(ctxWithValues, a.config, setupKey, "", &system.StaticInfo{}) if s, ok := gstatus.FromError(backoffErr); ok && (s.Code() == codes.PermissionDenied) { // we got an answer from management, exit backoff earlier return backoff.Permanent(backoffErr) @@ -123,7 +123,7 @@ func (a *Auth) Login() error { // check if we need to generate JWT token err := a.withBackOff(a.ctx, func() (err error) { - needsLogin, err = internal.IsLoginRequired(a.ctx, a.config.PrivateKey, a.config.ManagementURL, a.config.SSHKey) + needsLogin, err = internal.IsLoginRequired(a.ctx, a.config.PrivateKey, a.config.ManagementURL, a.config.SSHKey, &system.StaticInfo{}) return }) if err != nil { @@ -136,7 +136,7 @@ func (a *Auth) Login() error { } err = a.withBackOff(a.ctx, func() error { - err := internal.Login(a.ctx, a.config, "", jwtToken) + err := internal.Login(a.ctx, a.config, "", jwtToken, &system.StaticInfo{}) if s, ok := gstatus.FromError(err); ok && (s.Code() == codes.InvalidArgument || s.Code() == codes.PermissionDenied) { return nil }