I have generated a custom node based on an OpenAPI specification using NodePit’s nodegenerator.jar. I have modified the NodeDialog class using DialogComponentPasswordField for users to configure a password and store it using NodeSettings class.
However, I want to be able to pass in the password as a Flow Variable from a Credentials Configuration node. Right now, my field is displaying as a String type in the new node’s Flow Variables configuration, so I cannot assign the credentials flow variable to it.
Does anyone know what classes I need to instantiate to be able to take credentials as input to the new node? An example would be extremely helpful, too.
I tried to enter Open AI authenticator key which is Quite long that what is permitted in the Node Password Enter BOX. It is not accepting after a certain size and the key I got from OPEN AI is much longer.
Can any one help me out
Hi @chandra_sekhar, thank you for joining the KNIME Forum and posting your question.
Mind that the right category for posting questions about node configurations or issues in KNIME is this one: KNIME Analytics Platform - KNIME Community Forum. This category is meant for users of KNIME Analytics Platform. Please open a new thread, if the answer to your question is not available already by searching the Forum.
The current category where you posted is dedicated to Node Development. This category is meant for community developers who create new and maintain existing KNIME nodes.
I will be able to assist you in the right category.
After days of searching KNIME Forums, Google, and Bing, I was finally presented with a KNIME Forum post that I have never seen before. This is the post with an example of using Credentials:
However, I am faced with a new issue implementing this solution whenever I try to re-configure the node:
The “my-credentials” key is only mentioned once in the NodeModel class, and it’s not clear to me how to resolve this error. At this point, I cannot re-configure my node.
If anyone has any suggestions for how to resolve this issue in the example files from the other Forum post, then I would greatly appreciate some guidance.
To resolve my final issue, all that I had to do was to modify the
static final SettingsModelAuthentication createAuthenticationModel() {
return new SettingsModelAuthentication(“my-credentials”, AuthenticationType.USER_PWD);
to take a String argument for my model names
static final SettingsModelAuthentication createAuthenticationModel(String key) {
return new SettingsModelAuthentication(key, AuthenticationType.CREDENTIALS);
}
(Note - I also wanted to use CREDENTIALS passed from Credentials Configuration nodes, so I removed the USER_PWD authentication type.)