use of com.auth0.json.auth.TokenHolder in project CollectiveOneWebapp by CollectiveOne.
the class Auth0Management method managementAPI.
@Bean
public ManagementAPI managementAPI() {
String token = "";
AuthRequest authRequest = authAPI.requestToken("https://collectiveone.auth0.com/api/v2/");
try {
TokenHolder holder = authRequest.execute();
token = holder.getAccessToken();
} catch (APIException exception) {
System.out.println(exception.getMessage());
} catch (Auth0Exception exception) {
System.out.println(exception.getMessage());
}
return new ManagementAPI(issuer, token);
}
Aggregations