Added get/setCredentialProvider() fixing #2