/**
  * Checks the value of an XML attribute which represents a redirect URL. If not empty or starting
  * with "$" (potential placeholder), "/" or "http" it will raise an error.
  */
 static void validateHttpRedirect(String url, ParserContext pc, Object source) {
   if (!StringUtils.hasText(url) || UrlUtils.isValidRedirectUrl(url) || url.startsWith("$")) {
     return;
   }
   pc.getReaderContext()
       .warning(url + " is not a valid redirect URL (must start with '/' or http(s))", source);
 }
 @Override
 public void afterPropertiesSet() {
   Assert.notNull(sessionRegistry, "SessionRegistry required");
   Assert.isTrue(
       expiredUrl == null || UrlUtils.isValidRedirectUrl(expiredUrl),
       expiredUrl + " isn't a valid redirect URL");
 }
 public ConcurrentSessionFilter(SessionRegistry sessionRegistry, String expiredUrl) {
   Assert.notNull(sessionRegistry, "SessionRegistry required");
   Assert.isTrue(
       expiredUrl == null || UrlUtils.isValidRedirectUrl(expiredUrl),
       expiredUrl + " isn't a valid redirect URL");
   this.sessionRegistry = sessionRegistry;
   this.expiredUrl = expiredUrl;
 }
 public void afterPropertiesSet() throws Exception {
   Assert.isTrue(
       StringUtils.hasText(loginFormUrl) && UrlUtils.isValidRedirectUrl(loginFormUrl),
       "loginFormUrl must be specified and must be a valid redirect URL");
   if (useForward && UrlUtils.isAbsoluteUrl(loginFormUrl)) {
     throw new IllegalArgumentException(
         "useForward must be false if using an absolute loginFormURL");
   }
   Assert.notNull(portMapper, "portMapper must be specified");
   Assert.notNull(portResolver, "portResolver must be specified");
 }
 /**
  * The URL which will be used as the failure destination.
  *
  * @param defaultFailureUrl the failure URL, for example "/loginFailed.jsp".
  */
 public void setDefaultFailureUrl(String defaultFailureUrl) {
   Assert.isTrue(
       UrlUtils.isValidRedirectUrl(defaultFailureUrl),
       "'" + defaultFailureUrl + "' is not a valid redirect URL");
   this.defaultFailureUrl = defaultFailureUrl;
 }