Open jakub-bochenski opened 1 month ago
E.g.
OAuth2Options credentials = new OAuth2Options() .setFlow(OAuth2FlowType.CLIENT) .setClientId("<client-id>") .setClientSecret("<client-secret>") .setSite("https://api.oauth.com"); // Initialize the OAuth2 Library OAuth2Auth oauth2 = OAuth2Auth.create(vertx, credentials); JsonObject tokenConfig = new JsonObject(); oauth2.authenticate(tokenConfig) .onSuccess(user -> { // Success }) .onFailure(err -> { System.err.println("Access Token Error: " + err.getMessage()); });
https://vertx.io/docs/vertx-auth-oauth2/java/#_client_credentials_flow
.setFlow(OAuth2FlowType.CLIENT) and oauth2.authenticate(tokenConfig) taking JsonObject are both deprecated
.setFlow(OAuth2FlowType.CLIENT)
oauth2.authenticate(tokenConfig)
JsonObject
E.g.
https://vertx.io/docs/vertx-auth-oauth2/java/#_client_credentials_flow
.setFlow(OAuth2FlowType.CLIENT)
andoauth2.authenticate(tokenConfig)
takingJsonObject
are both deprecated