IdentityPersistenceManager manager = IdentityPersistenceManager
.getPersistanceManager();
user = manager.getUserByPPID(IdentityTenantUtil.getRegistry(null, null), ppidValue);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new IdentityProviderException("Cannot retrieve username because "+e.getMessage(), e);
}
if (user != null) {
userIdentifier = user;
// TODO:
/*XMLSignature signature = null;
*KeyInfo keyInfo = null;
*signature = (XMLSignature) assertion.getNativeSignature();
*keyInfo = signature.getKeyInfo();
*
* if (validateKeyInfo(user, keyInfo.getElement())) { userIdentifier = user; }
* else { throw new IdentityProviderException("signatureInfoMismatch", new
* String[]{ppidValue}); }
*/
} else {
log.error("Alian PPID");
throw new IdentityProviderException("Alian PPID");
}
} else {
log.error("Invalid SAML attribute assertion");
throw new IdentityProviderException("Invalid SAML attribute assertio");
}
} else if (this.authMechanism == IdentityConstants.AUTH_TYPE_USERNAME_TOKEN) {
userIdentifier = rahasData.getPrincipal().getName();
} else {
log.error("Invalid authentication mechanism");
throw new IdentityProviderException("Invalid authentication mechanism");
}
}