ClaimsManager claimsManager = new ClaimsManager();
ClaimsHandler claimsHandler = new CustomClaimsHandler();
claimsManager.setClaimHandlers(Collections.singletonList(claimsHandler));
providerParameters.setClaimsManager(claimsManager);
RequestClaimCollection primaryClaims = createClaims();
primaryClaims.setDialect(ClaimTypes.URI_BASE);
providerParameters.setRequestedPrimaryClaims(primaryClaims);
RequestClaimCollection secondaryClaims = new RequestClaimCollection();
RequestClaim claim = new RequestClaim();
claim.setClaimType(ClaimTypes.STREETADDRESS);
secondaryClaims.add(claim);
secondaryClaims.setDialect(ClaimTypes.URI_BASE);
providerParameters.setRequestedSecondaryClaims(secondaryClaims);
List<AttributeStatementProvider> customProviderList = new ArrayList<AttributeStatementProvider>();
customProviderList.add(new CustomAttributeProvider());
((SAMLTokenProvider)samlTokenProvider).setAttributeStatementProviders(customProviderList);