private ClaimCollection filterHandlerClaims(ClaimCollection claims, List<String> handlerClaimTypes) { ClaimCollection supportedClaims = new ClaimCollection(); supportedClaims.setDialect(claims.getDialect()); for (Claim claim : claims) { if (handlerClaimTypes.contains(claim.getClaimType())) { supportedClaims.add(claim); } } return supportedClaims; }
private static boolean isClaimOverridden(ClaimBean bean, List<ClaimBean> mClaims) { for (ClaimBean methodBean : mClaims) { if (bean.getClaim().getClaimType().equals(methodBean.getClaim().getClaimType()) && bean.getClaimFormat().equals(methodBean.getClaimFormat())) { return true; } } return false; }
if (!super.equals(obj)) { return false; if (nameFormat == null && ((SAMLClaim)obj).getNameFormat() != null) { return false; } else if (nameFormat != null && !nameFormat.equals(((SAMLClaim)obj).getNameFormat())) { return false; if (name == null && ((SAMLClaim)obj).getName() != null) { return false; } else if (name != null && !name.equals(((SAMLClaim)obj).getName())) { return false; if (friendlyName == null && ((SAMLClaim)obj).getFriendlyName() != null) { return false; } else if (friendlyName != null && !friendlyName.equals(((SAMLClaim)obj).getFriendlyName())) { return false;
private ClaimCollection createRequestClaimCollection() { ClaimCollection claims = new ClaimCollection(); Claim claim = new Claim(); claim.setClaimType(ClaimTypes.FIRSTNAME); claim.setOptional(true); claims.add(claim); claim = new Claim(); claim.setClaimType(ClaimTypes.LASTNAME); claim.setOptional(true); claims.add(claim); claim = new Claim(); claim.setClaimType(ClaimTypes.EMAILADDRESS); claim.setOptional(true); claims.add(claim); return claims; }
/** * Create a clone of the provided claim. * * @param claim Claim to be cloned. Value cannot be null. */ public Claim(Claim claim) { if (claim == null) { throw new IllegalArgumentException("Claim cannot be null"); } claimType = claim.getClaimType(); optional = claim.isOptional(); values.addAll(claim.getValues()); }
@Override public Claim clone() { try { super.clone(); // Checkstyle requires this call } catch (CloneNotSupportedException e) { e.printStackTrace(); } return new Claim(this); }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((issuer == null) ? 0 : issuer.hashCode()); result = prime * result + ((originalIssuer == null) ? 0 : originalIssuer.hashCode()); return result; }
@Override public ProcessedClaim clone() { super.clone(); // Checkstyle requires this call return new ProcessedClaim(this); } }
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("ProcessedClaim ["); builder.append(super.toString()); builder.append(", issuer="); builder.append(issuer); builder.append(", originalIssuer="); builder.append(originalIssuer); builder.append(", principal="); builder.append(principal); builder.append("]"); return builder.toString(); }
public void serialize(XMLStreamWriter writer, String prefix, String namespace) throws XMLStreamException { writer.writeStartElement(prefix, "Claims", namespace); writer.writeNamespace(dialectPrefix, dialect.toString()); writer.writeAttribute(null, "Dialect", dialect.toString()); for (Claim claim : this) { claim.serialize(writer, dialectPrefix, dialect.toString()); } writer.writeEndElement(); }
private ClaimCollection filterHandlerClaims(ClaimCollection claims, List<String> handlerClaimTypes) { ClaimCollection supportedClaims = new ClaimCollection(); supportedClaims.setDialect(claims.getDialect()); for (Claim claim : claims) { if (handlerClaimTypes.contains(claim.getClaimType())) { supportedClaims.add(claim); } } return supportedClaims; }
/** * Create a clone of the provided claim. * * @param claim Claim to be cloned. Value cannot be null. */ public Claim(Claim claim) { if (claim == null) { throw new IllegalArgumentException("Claim cannot be null"); } claimType = claim.getClaimType(); optional = claim.isOptional(); values.addAll(claim.getValues()); }
private static boolean isClaimOverridden(ClaimBean bean, List<ClaimBean> mClaims) { for (ClaimBean methodBean : mClaims) { if (bean.getClaim().getClaimType().equals(methodBean.getClaim().getClaimType()) && bean.getClaimFormat().equals(methodBean.getClaimFormat())) { return true; } } return false; }
@Override public Claim clone() { try { super.clone(); // Checkstyle requires this call } catch (CloneNotSupportedException e) { e.printStackTrace(); } return new Claim(this); }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((issuer == null) ? 0 : issuer.hashCode()); result = prime * result + ((originalIssuer == null) ? 0 : originalIssuer.hashCode()); return result; }
@Override public ProcessedClaim clone() { super.clone(); // Checkstyle requires this call return new ProcessedClaim(this); } }
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("ProcessedClaim ["); builder.append(super.toString()); builder.append(", issuer="); builder.append(issuer); builder.append(", originalIssuer="); builder.append(originalIssuer); builder.append(", principal="); builder.append(principal); builder.append("]"); return builder.toString(); }
public void serialize(XMLStreamWriter writer, String prefix, String namespace) throws XMLStreamException { writer.writeStartElement(prefix, "Claims", namespace); writer.writeNamespace(dialectPrefix, dialect.toString()); writer.writeAttribute(null, "Dialect", dialect.toString()); for (Claim claim : this) { claim.serialize(writer, dialectPrefix, dialect.toString()); } writer.writeEndElement(); }
@Override public int hashCode() { int hashCode = super.hashCode(); if (nameFormat != null) { hashCode = 31 * hashCode + nameFormat.hashCode(); } if (name != null) { hashCode = 31 * hashCode + name.hashCode(); } if (friendlyName != null) { hashCode = 31 * hashCode + friendlyName.hashCode(); } return hashCode; }
@Override public int hashCode() { int hashCode = super.hashCode(); if (nameFormat != null) { hashCode = 31 * hashCode + nameFormat.hashCode(); } if (name != null) { hashCode = 31 * hashCode + name.hashCode(); } if (friendlyName != null) { hashCode = 31 * hashCode + friendlyName.hashCode(); } return hashCode; }