6970717273747576777879
} 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();
3435363738394041
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; }
4950515253545556
} } return new FederationUser(response.getUsername(), "N/A", (GrantedAuthority[]) grantedAuthorities.toArray( new GrantedAuthority[grantedAuthorities.size()]), new ClaimCollection(response.getClaims())); }
86878889909192
return sb.toString(); } @Override public ClaimCollection getClaims() { return new ClaimCollection(response.getClaims()); }
7273747576777879808182
} 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();
8586878889909192939495
} 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");
4748495051525354
grantedAuthorities.add(new SimpleGrantedAuthority("ROLE_" + (this.convertToUpperCase ? role.toUpperCase() : role))); } } return new FederationUser(response.getUsername(), "N/A", grantedAuthorities, new ClaimCollection(response.getClaims())); }
31323334353637
private FederationResponse response; public FederationUserPrincipal(String name, FederationResponse response) { this.name = name; this.response = response; this.claims = new ClaimCollection(response.getClaims()); }
88899091929394
8384858687888990919293
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");