Package org.apache.cxf.rs.security.saml.assertion

Examples of org.apache.cxf.rs.security.saml.assertion.Claim


        // OpenSaml
        List<Claim> claims = new ArrayList<Claim>();
        List<AttributeStatement> statements = assertionW.getSaml2().getAttributeStatements();
        for (AttributeStatement as : statements) {
            for (Attribute atr : as.getAttributes()) {
                Claim claim = new Claim();
                claim.setName(atr.getName());
                claim.setNameFormat(atr.getNameFormat());
                claim.setFriendlyName(atr.getFriendlyName());
                for (XMLObject o : atr.getAttributeValues()) {
                    String attrValue = o.getDOM().getTextContent();
                    claim.getValues().add(attrValue);
                }
                claims.add(claim);
            }
        }
        return new Claims(claims);
View Full Code Here


                               Claims cs,
                               String roleClaimNameQualifier,
                               String roleClaimNameFormat) {
        super(p);
       
        Claim rolesClaim = null;
        for (Claim c : cs.getClaims()) {
            if (c.getName().equals(roleClaimNameQualifier)
                && c.getNameFormat().equals(roleClaimNameFormat)) {
                rolesClaim = c;
                break;
            }
        }
        this.claims = cs;

        Set<Principal> userRoles;
        if (rolesClaim != null) {
            userRoles = new HashSet<Principal>();
            for (String role : rolesClaim.getValues()) {
                userRoles.add(new SimplePrincipal(role));
            }
        } else {
            userRoles = null;
        }
View Full Code Here

        // OpenSaml
        List<Claim> claims = new ArrayList<Claim>();
        List<AttributeStatement> statements = assertionW.getSaml2().getAttributeStatements();
        for (AttributeStatement as : statements) {
            for (Attribute atr : as.getAttributes()) {
                Claim claim = new Claim();
                claim.setName(atr.getName());
                claim.setNameFormat(atr.getNameFormat());
                claim.setFriendlyName(atr.getFriendlyName());
                for (XMLObject o : atr.getAttributeValues()) {
                    String attrValue = o.getDOM().getTextContent();
                    claim.getValues().add(attrValue);
                }
                claims.add(claim);
            }
        }
        return new Claims(claims);
View Full Code Here

        // OpenSaml
        List<Claim> claims = new ArrayList<Claim>();
        List<AttributeStatement> statements = assertionW.getSaml2().getAttributeStatements();
        for (AttributeStatement as : statements) {
            for (Attribute atr : as.getAttributes()) {
                Claim claim = new Claim();
                claim.setName(atr.getName());
                claim.setNameFormat(atr.getNameFormat());
                claim.setFriendlyName(atr.getFriendlyName());
                for (XMLObject o : atr.getAttributeValues()) {
                    String attrValue = o.getDOM().getTextContent();
                    claim.getValues().add(attrValue);
                }
                claims.add(claim);
            }
        }
        return new Claims(claims);
View Full Code Here

        // OpenSaml
        List<Claim> claims = new ArrayList<Claim>();
        List<AttributeStatement> statements = assertionW.getSaml2().getAttributeStatements();
        for (AttributeStatement as : statements) {
            for (Attribute atr : as.getAttributes()) {
                Claim claim = new Claim();
                claim.setName(atr.getName());
                claim.setNameFormat(atr.getNameFormat());
                claim.setFriendlyName(atr.getFriendlyName());
                for (XMLObject o : atr.getAttributeValues()) {
                    String attrValue = o.getDOM().getTextContent();
                    claim.getValues().add(attrValue);
                }
                claims.add(claim);
            }
        }
        return new Claims(claims);
View Full Code Here

TOP

Related Classes of org.apache.cxf.rs.security.saml.assertion.Claim

Copyright © 2018 www.massapicom. 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.