Extension node with Credentials - need code example

Hi,

i am currently trying to develop a special database connector and would like to offer the user the option to use workflow credentials instead of username/password.

I wanted to follow the example of the DatabaseConnector, but cannot find its source code anywhere (including the NodePit).

The basic problem I am facing is that the credentials-provider is not set in the dialog. Could someone please provide a code snippet that shows how to define a widget that uses credentials?

Thanks,

Dietrich