in src/main/java/software/amazon/msk/auth/iam/IAMOAuthBearerLoginCallbackHandler.java [107:128]
public void handle(@NonNull Callback[] callbacks) throws IOException, UnsupportedCallbackException {
if (!configured()) {
throw new IllegalStateException("Callback handler not configured");
}
for (Callback callback : callbacks) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Type information for callback: " + debugClassString(callback.getClass()) + " from "
+ debugClassString(this.getClass()));
}
if (callback instanceof OAuthBearerTokenCallback) {
try {
handleCallback((OAuthBearerTokenCallback) callback);
} catch (ParseException | URISyntaxException e) {
throw new MalformedURLException(e.getMessage());
}
} else {
String message = "Unsupported callback type: " + debugClassString(callback.getClass()) + " from "
+ debugClassString(this.getClass());
throw new UnsupportedCallbackException(callback, message);
}
}
}