Package org.apache.cxf.fediz.core

Examples of org.apache.cxf.fediz.core.ClaimCollection


        }

        if (p instanceof FederationPrincipal) {
            FederationPrincipal fp = (FederationPrincipal)p;
           
            ClaimCollection claims = fp.getClaims();
            for (Claim c: claims) {
                out.println("<p>" + c.getClaimType().toString() + "=" + c.getValue() + "</p>");
            }
           
            Element el = fp.getLoginToken();
View Full Code Here


    protected Element loginToken;

    public FederationPrincipalImpl(String username, List<String> roles,
            List<Claim> claims, Element loginToken) {
        super(username, null, roles);
        this.claims = new ClaimCollection(claims);
        this.loginToken = loginToken;
    }
View Full Code Here

            }
        }
        return new FederationUser(response.getUsername(), "N/A",
                                  (GrantedAuthority[]) grantedAuthorities.toArray(
                                      new GrantedAuthority[grantedAuthorities.size()]),
                                  new ClaimCollection(response.getClaims()));
       
    }
View Full Code Here

        return sb.toString();
    }

    @Override
    public ClaimCollection getClaims() {
        return new ClaimCollection(response.getClaims());
    }
View Full Code Here

        }

        if (p instanceof FederationPrincipal) {
            FederationPrincipal fp = (FederationPrincipal)p;

            ClaimCollection claims = fp.getClaims();
            for (Claim c : claims) {
                out.println("<p>" + c.getClaimType().toString() + "=" + c.getValue() + "</p>");
            }
           
            Element el = fp.getLoginToken();
View Full Code Here

            }
            out.println("</ul>");
           
            if (fedAuthToken.getUserDetails() instanceof FederationUser) {
                out.println("<br><b>Claims</b><p>");
                ClaimCollection claims = ((FederationUser)fedAuthToken.getUserDetails()).getClaims();
                for (Claim c: claims) {
                    out.println(c.getClaimType().toString() + ": " + c.getValue() + "<p>");
                }
            } else {
                out.println("FederationAuthenticationToken found but not FederationUser");
View Full Code Here

                grantedAuthorities.add(new SimpleGrantedAuthority("ROLE_"
                                        + (this.convertToUpperCase ? role.toUpperCase() : role)));
            }
        }
        return new FederationUser(response.getUsername(), "N/A",
                        grantedAuthorities, new ClaimCollection(response.getClaims()));
       
    }
View Full Code Here

    private FederationResponse response;

    public FederationUserPrincipal(String name, FederationResponse response) {
        this.name = name;
        this.response = response;
        this.claims = new ClaimCollection(response.getClaims());
    }
View Full Code Here

        return sb.toString();
    }

    @Override
    public ClaimCollection getClaims() {
        return new ClaimCollection(response.getClaims());
    }
View Full Code Here

        if (p instanceof FederationPrincipal) {
            FederationPrincipal fp = (FederationPrincipal)p;

            out.println("<br><b>Claims</b><p>");
            ClaimCollection claims = fp.getClaims();
            for (Claim c: claims) {
                out.println(c.getClaimType().toString() + ": " + c.getValue() + "<p>");
            }
        } else {
            out.println("Principal is not instance of FederationPrincipal");
View Full Code Here

TOP

Related Classes of org.apache.cxf.fediz.core.ClaimCollection

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.