Examples of FederationPrincipal


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

        for (String item: roleListToCheck) {
            out.println("Has role '" + item + "': " + ((request.isUserInRole(item)) ? "<b>yes</b>" : "no") + "<p>");
        }

        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 FederationPrincipalImpl");
View Full Code Here

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

                         FilterChain chain) throws IOException, ServletException {

        if (request instanceof HttpServletRequest) {
            HttpServletRequest hrequest = (HttpServletRequest)request;
            Principal p = hrequest.getUserPrincipal();
            FederationPrincipal fedPrinc = (FederationPrincipal)p;
            Element el = (Element)fedPrinc.getLoginToken();
            if (el != null) {
                try {
                    SecurityTokenThreadLocal.setToken(el);
                    chain.doFilter(request, response);
                } finally {
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.