Add credential parameter callback, and add constructors for credential callback