exceptionfactory commented on a change in pull request #5319:
URL: https://github.com/apache/nifi/pull/5319#discussion_r706357305



##########
File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java
##########
@@ -702,6 +714,19 @@ public void onPropertyModified(final PropertyDescriptor 
descriptor, final String
                     .build());
         }
 
+        boolean usingUserNamePasswordAuthorization = 
validationContext.getProperty(PROP_BASIC_AUTH_USERNAME).isSet()
+            || validationContext.getProperty(PROP_BASIC_AUTH_USERNAME).isSet();
+
+        boolean usingOAuth2Authorization = 
validationContext.getProperty(OAUTH2_ACCESS_TOKEN_PROVIDER).isSet();
+
+        if (usingUserNamePasswordAuthorization && usingOAuth2Authorization) {
+            results.add(new ValidationResult.Builder()
+                .subject("Authorization properties")
+                .valid(false)
+                .explanation("Can't use username+password and OAuth2 
authorization at the same time")

Review comment:
       Although it seems helpful to call out the actual property name, I would 
be happy with something shorter that removes the `+` character. Here is one 
suggestion:
   ```suggestion
                   .explanation("OAuth2 Authorization cannot be configured 
together with Username and Password properties")
   ```




-- 
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


Reply via email to