ChrisSamo632 commented on code in PR #6645:
URL: https://github.com/apache/nifi/pull/6645#discussion_r1019658583
##########
nifi-nar-bundles/nifi-standard-services/nifi-oauth2-provider-bundle/nifi-oauth2-provider-service/src/main/java/org/apache/nifi/oauth2/StandardOauth2AccessTokenProvider.java:
##########
@@ -338,4 +342,20 @@ private boolean isRefreshRequired() {
return Instant.now().isAfter(expirationRefreshTime);
}
+
+ @Override
+ public List<ConfigVerificationResult> verify(ConfigurationContext context,
ComponentLog verificationLogger, Map<String, String> variables) {
+ ConfigVerificationResult.Builder builder = new
ConfigVerificationResult.Builder()
+ .verificationStepName("Can acquire token");
+
+ try {
+ getAccessDetails();
+ builder.outcome(ConfigVerificationResult.Outcome.SUCCESSFUL);
+ } catch (Exception ex) {
Review Comment:
I'm not familiar with what Exceptions might be thrown here, would the
message always be appropriate (on its own)?
Would it be sensible to also log the exception, e.g. as a warning with a
stacktrace?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]