Connecting the output of the Google Authenticator Node into a own Python based KNIME Node

Hello,

I‘m trying to create a new Python based KNIME Node with this documentation. Create a New Python based KNIME Extension

My goal is to connect the output port from the Google Authenticator Node (Extension: KNIME Google Connectors) into my new node as an input.
I was wondering if there is any way to build an input port so I can use the credentials a user gets from the Google Authenticator Node.
I tried using a custom port object without any luck so far. (Create a New Python based KNIME Extension)

Best regards
Vitus

Hello @Vits,

It’s great that you’re developing Python-based KNIME extensions. I hope this is just the beginning of a new node series. :knime: :yellow_heart:

Currently, it is possible to connect to the Google Authenticator output port by adding and input port with the type “Credentials” to the one that you are creating :point_down:t2:

@knext.input_port(
    name="port-name",
    description="port-description",
    port_type=knext.PortType.CREDENTIAL,
)

Then, in the execution method of the node, it is possible to access the PortObject and “extract” the access token generated by the Google Authenticator node, something similar to this. :point_down:t2:

access_token = knext.PortObject.spec.auth_parameters

If you have any other question regarding this topic please let us now.

Have a nice day :palm_tree:

3 Likes

Thank you for your reply! It has helped me a lot.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.