Skip to content

Commit

Permalink
Fix scope
Browse files Browse the repository at this point in the history
  • Loading branch information
carlesarnal committed Dec 19, 2024
1 parent 035006a commit bd4e6b5
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit bd4e6b5

Please sign in to comment.