-
Notifications
You must be signed in to change notification settings - Fork 2.9k
NIFI-9648 Fixed the dependsOn logic in StandardOauth2AccessTokenProvi… #5734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -106,15 +106,16 @@ public class StandardOauth2AccessTokenProvider extends AbstractControllerService | |
| 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) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is incorrect. Resource Owner Password Credentials Grant also may require these parameters.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. |
||
| .required(true) | ||
| .sensitive(true) | ||
| .addValidator(StandardValidators.NON_BLANK_VALIDATOR) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorrect. Resource Owner Password Credentials Grant also may require these parameters.