MikeThomsen commented on a change in pull request #5734:
URL: https://github.com/apache/nifi/pull/5734#discussion_r797714535
##########
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:
I think what I was seeing was a UX issue with dependsOn in this case.
The client secret was not showing, and that was kinda confusing to me. So I'm
going to play around with this and add some custom validation where appropriate
to make it cleaner.
--
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]