Package net.shibboleth.idp.cas.service
Class DefaultServiceComparator
java.lang.Object
net.shibboleth.idp.cas.service.DefaultServiceComparator
- All Implemented Interfaces:
Comparator<String>
Default comparator implementation for comparing CAS service URLs. URL comparison is case-insensitive and supports
ignoring predefined URL path parameters. The common session marker ;jessionid=value is ignored by default.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Pattern[]Ignored patterns in path part of URL.private final org.slf4j.LoggerClass logger. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance that ignores ;jsessionid=value.DefaultServiceComparator(String... parameterNames) Creates a new instance that ignores the given path parameter names (and any associated values). -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
ignoredPatterns
Ignored patterns in path part of URL.
-
-
Constructor Details
-
DefaultServiceComparator
public DefaultServiceComparator()Creates a new instance that ignores ;jsessionid=value. -
DefaultServiceComparator
Creates a new instance that ignores the given path parameter names (and any associated values).- Parameters:
parameterNames- List of path parameter names to ignore.
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<String>
-
stripPathParameters
Strips any of the named path parameters (and any associated values) from the given URI.- Parameters:
uriString- String form of URI from which to strip named path parameters.- Returns:
- URI with named path parameters and any associated values removed.
-