public InfoCardAuthInfoDTO getInfoCardAuthInfo() throws Exception {
IdentityClaimManager claimManager = null;
Claim[] claims = null;
List<String> required = null;
List<String> optional = null;
InfoCardAuthInfoDTO dto = null;
UserRealm realm = null;
claimManager = IdentityClaimManager.getInstance();
realm = IdentityTenantUtil.getRealm(null, null);
claims = claimManager.getAllSupportedClaims(IdentityConstants.INFOCARD_DIALECT, realm);
if (claims == null || claims.length == 0) {
return null;
}
required = new ArrayList<String>();
optional = new ArrayList<String>();
for (Claim claim : claims) {
if (claim.isRequired()) {
required.add(claim.getClaimUri());
} else {
optional.add(claim.getClaimUri());
}
}
dto = new InfoCardAuthInfoDTO();
dto.setOptionalClaims(optional.toArray(new String[optional.size()]));
dto.setRequiredClaims(required.toArray(new String[required.size()]));
dto.setTokenType(IdentityConstants.SAML11_URL);
return dto;
}