public List<String> getCompiledFilterNames() { if (isDisabled() == true) return Collections.emptyList(); List<String> result = new ArrayList<String>(); if (isRequireSSL()) result.add(GeoServerSecurityFilterChain.SSL_FILTER); if (isAllowSessionCreation()) result.add(GeoServerSecurityFilterChain.SECURITY_CONTEXT_ASC_FILTER); else result.add(GeoServerSecurityFilterChain.SECURITY_CONTEXT_NO_ASC_FILTER); if (StringUtils.hasLength(getRoleFilterName())) result.add(getRoleFilterName()); createCompiledFilterList(result); return result; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (isConstant() ? 1231 : 1237); result = prime * result + (isAllowSessionCreation() ? 17 : 19); result = prime * result + (isDisabled() ? 23 : 29); result = prime * result + (isRequireSSL() ? 31 : 37); result = prime * result + (isMatchHTTPMethod() ? 41 : 49); result = prime * ((roleFilterName == null) ? 1 : roleFilterName.hashCode()); result = prime * result + ((httpMethods == null) ? 0 : httpMethods.hashCode()); result = prime * result + ((filterNames == null) ? 0 : filterNames.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((patterns == null) ? 0 : patterns.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; RequestFilterChain other = (RequestFilterChain) obj; if (this.roleFilterName == null && other.roleFilterName != null) return false; if (this.roleFilterName != null && this.roleFilterName.equals(other.roleFilterName) == false) return false; if (this.isAllowSessionCreation() != other.isAllowSessionCreation()) return false; if (this.isDisabled() != other.isDisabled()) return false; if (this.isRequireSSL() != other.isRequireSSL()) return false; if (this.isMatchHTTPMethod() != other.isMatchHTTPMethod()) return false; if (filterNames == null) { if (other.filterNames != null) return false; } else if (!filterNames.equals(other.filterNames)) return false; if (httpMethods == null) { if (other.httpMethods != null) return false; } else if (!httpMethods.equals(other.httpMethods)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (patterns == null) { if (other.patterns != null) return false; } else if (!patterns.equals(other.patterns)) return false; return true; }
"allowSessionCreation", Boolean.toString(requestChain.isAllowSessionCreation())); writer.addAttribute("ssl", Boolean.toString(requestChain.isRequireSSL())); writer.addAttribute( "matchHTTPMethod", Boolean.toString(requestChain.isMatchHTTPMethod()));
public boolean isRequireSSL() { return chain.isRequireSSL(); } public void setRequireSSL(boolean requireSSL) {
public boolean isRequireSSL() { return chain.isRequireSSL(); }
assertFalse(chain.isRequireSSL()); assertFalse(StringUtils.hasLength(chain.getRoleFilterName()));