exceptionfactory commented on code in PR #6782: URL: https://github.com/apache/nifi/pull/6782#discussion_r1059226097
########## nifi-nar-bundles/nifi-standard-services/nifi-oauth2-provider-bundle/nifi-oauth2-provider-service/src/main/java/org/apache/nifi/oauth2/StandardOauth2AccessTokenProvider.java: ########## @@ -236,6 +252,19 @@ protected Collection<ValidationResult> customValidate(ValidationContext validati .build()); } + String clientAuthenticationStrategy = validationContext.getProperty(CLIENT_AUTHENTICATION_STRATEGY).getValue(); + try { + ClientAuthenticationStrategy.valueOf(clientAuthenticationStrategy); + } catch (IllegalArgumentException ex) { + validationResults.add(new ValidationResult.Builder().subject(CLIENT_AUTHENTICATION_STRATEGY.getDisplayName()) + .valid(false) + .explanation(String.format("Unrecognized %s value '%s'", + CLIENT_AUTHENTICATION_STRATEGY.getDisplayName(), + clientAuthenticationStrategy) + ) + .build()); + } Review Comment: This custom validation is not necessary because the allowable values will prevent unsupported values from being configured. ```suggestion ``` -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org