You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/02/02 13:22:26 UTC

[GitHub] [nifi] tpalfy commented on a change in pull request #5734: NIFI-9648 Fixed the dependsOn logic in StandardOauth2AccessTokenProvi…

tpalfy commented on a change in pull request #5734:
URL: https://github.com/apache/nifi/pull/5734#discussion_r797600700



##########
File path: nifi-nar-bundles/nifi-standard-services/nifi-oauth2-provider-bundle/nifi-oauth2-provider-service/src/main/java/org/apache/nifi/oauth2/StandardOauth2AccessTokenProvider.java
##########
@@ -106,15 +106,16 @@
     public static final PropertyDescriptor CLIENT_ID = new PropertyDescriptor.Builder()
         .name("client-id")
         .displayName("Client ID")
-        .required(false)
+        .dependsOn(GRANT_TYPE, CLIENT_CREDENTIALS_GRANT_TYPE)
+        .required(true)
         .addValidator(StandardValidators.NON_BLANK_VALIDATOR)
         .expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY)
         .build();
 
     public static final PropertyDescriptor CLIENT_SECRET = new PropertyDescriptor.Builder()
         .name("client-secret")
         .displayName("Client secret")
-        .dependsOn(CLIENT_ID)
+        .dependsOn(GRANT_TYPE, CLIENT_CREDENTIALS_GRANT_TYPE)

Review comment:
       This is incorrect. **Resource Owner Password Credentials Grant** _also_ requires these parameters.

##########
File path: nifi-nar-bundles/nifi-standard-services/nifi-oauth2-provider-bundle/nifi-oauth2-provider-service/src/main/java/org/apache/nifi/oauth2/StandardOauth2AccessTokenProvider.java
##########
@@ -106,15 +106,16 @@
     public static final PropertyDescriptor CLIENT_ID = new PropertyDescriptor.Builder()
         .name("client-id")
         .displayName("Client ID")
-        .required(false)
+        .dependsOn(GRANT_TYPE, CLIENT_CREDENTIALS_GRANT_TYPE)

Review comment:
       This is incorrect. **Resource Owner Password Credentials Grant** _also_ requires these parameters.




-- 
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-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org