Examples of InfoCardAuthInfoDTO


Examples of org.wso2.carbon.identity.relyingparty.dto.InfoCardAuthInfoDTO

    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;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.