From 8ac348e5e9eedb57b7ad45b979d216278b60eba2 Mon Sep 17 00:00:00 2001 From: PT-ATA No One Date: Wed, 28 Feb 2024 15:55:35 +0100 Subject: [PATCH] fix vaas_client_id --- golang/vaas/pkg/authenticator/authenticator_test.go | 5 ++++- .../src/main/java/de/gdata/vaasexample/Authentication.java | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/golang/vaas/pkg/authenticator/authenticator_test.go b/golang/vaas/pkg/authenticator/authenticator_test.go index ee7dd41f..fb98af61 100644 --- a/golang/vaas/pkg/authenticator/authenticator_test.go +++ b/golang/vaas/pkg/authenticator/authenticator_test.go @@ -95,7 +95,10 @@ func Test_resourceOwnerPasswordGrantAuthenticator_GetToken(t *testing.T) { log.Printf("failed to load environment - %v", err) } - clientID := "vaas-customer" + clientID, exists := os.LookupEnv("VAAS_CLIENT_ID") + if !exists { + log.Fatal("no username set") + } username, exists := os.LookupEnv("VAAS_USER_NAME") if !exists { log.Fatal("no username set") diff --git a/java/examples/VaasExample/src/main/java/de/gdata/vaasexample/Authentication.java b/java/examples/VaasExample/src/main/java/de/gdata/vaasexample/Authentication.java index b9e76e9b..45074570 100644 --- a/java/examples/VaasExample/src/main/java/de/gdata/vaasexample/Authentication.java +++ b/java/examples/VaasExample/src/main/java/de/gdata/vaasexample/Authentication.java @@ -9,6 +9,7 @@ public class Authentication { public static void main(String[] args) throws Exception { var clientId = System.getenv("CLIENT_ID"); var clientSecret = System.getenv("CLIENT_SECRET"); + var vaasclientId = System.getenv("VAAS_CLIENT_ID"); var userName = System.getenv("VAAS_USER_NAME"); var password = System.getenv("VAAS_PASSWORD"); var tokenUrl = System.getenv("TOKEN_URL"); @@ -18,7 +19,7 @@ public static void main(String[] args) throws Exception { // If you got a username and password from us, you can use the ResourceOwnerPasswordAuthenticator like this var authenticator = new ResourceOwnerPasswordGrantAuthenticator( - "vaas-customer", + vaasclientId, userName, password, new URI(tokenUrl)