String user = props.getProperty("claimUser");
Assert.notNull(user, "Property 'claimUser' not configured");
RequestClaimCollection requestedClaims = createRequestClaimCollection();
// add unsupported but mandatory claim
RequestClaim claim = new RequestClaim();
claim.setClaimType(ClaimTypes.GENDER);
claim.setOptional(false);
requestedClaims.add(claim);
ClaimsParameters params = new ClaimsParameters();
params.setPrincipal(new CustomTokenPrincipal(user));
claimsHandler.retrieveClaimValues(requestedClaims, params);