checkNotNullArgument(identity, "User");
checkNotNullArgument(credentials, "Credentials");
for (Credential credential : credentials)
{
IdentityObjectCredential ioc = null;
//Handle only those credentials that implement SPI
if (!(credential instanceof IdentityObjectCredential))
{