2nd pass at integrating with the "Credentials Plugin".
Functionality is working, but some clean-up may be needed
fixing compilation error when trying to convert between credential types