cas/src/main/java/org/springframework/security/cas/web/authentication/DefaultServiceAuthenticationDetails.java
private String getQueryString(final HttpServletRequest request,
			final Pattern artifactPattern) {
		final String query = request.getQueryString();
		if (query == null) {
			return null;
		}
		final String result = artifactPattern.matcher(query).replaceFirst("");
		if (result.length() == 0) {
			return null;
		}
		// strip off the trailing & only if the artifact was the first query param
		return result.startsWith("&") ? result.substring(1) : result;
	}
private String getQueryString(final HttpServletRequest request,
			final Pattern artifactPattern) {
		final String query = request.getQueryString();
		if (query == null) {
			return null;
		}
		final String result = artifactPattern.matcher(query).replaceFirst("");
		if (result.length() == 0) {
			return null;
		}
		// strip off the trailing & only if the artifact was the first query param
		return result.startsWith("&") ? result.substring(1) : result;
	}
If present, removes the artifactParameterName and the corresponding value from the
query String.
@param request
@return the query String minus the artifactParameterName and the corresponding
value.