From bd4e6b58beab697b771034367cfcad632afd21d5 Mon Sep 17 00:00:00 2001 From: Carles Arnal Date: Thu, 19 Dec 2024 09:30:10 +0100 Subject: [PATCH] Fix scope --- .../apicurio/registry/client/auth/VertXAuthFactory.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/java-sdk/src/main/java/io/apicurio/registry/client/auth/VertXAuthFactory.java b/java-sdk/src/main/java/io/apicurio/registry/client/auth/VertXAuthFactory.java index e91bbbd251..95e019524f 100644 --- a/java-sdk/src/main/java/io/apicurio/registry/client/auth/VertXAuthFactory.java +++ b/java-sdk/src/main/java/io/apicurio/registry/client/auth/VertXAuthFactory.java @@ -27,11 +27,14 @@ public static WebClient buildOIDCWebClient(Vertx vertx, String tokenUrl, String String clientSecret, String scope) { WebClient webClient = WebClient.create(vertx); - OAuth2Auth oAuth2Options = OAuth2Auth.create(vertx, new OAuth2Options().setFlow(OAuth2FlowType.CLIENT) - .setClientId(clientId).setClientSecret(clientSecret).setTokenPath(tokenUrl)); + OAuth2Auth oAuth2Options = OAuth2Auth.create(vertx, new OAuth2Options() + .setFlow(OAuth2FlowType.CLIENT) + .setClientId(clientId) + .setClientSecret(clientSecret) + .setTokenPath(tokenUrl)); Oauth2Credentials oauth2Credentials = new Oauth2Credentials(); - + oauth2Credentials.addScope(scope); OAuth2WebClient oauth2WebClient = OAuth2WebClient.create(webClient, oAuth2Options); oauth2WebClient.withCredentials(oauth2Credentials);