Example usage for org.springframework.security.web.util UrlUtils isValidRedirectUrl

List of usage examples for org.springframework.security.web.util UrlUtils isValidRedirectUrl

Introduction

In this page you can find the example usage for org.springframework.security.web.util UrlUtils isValidRedirectUrl.

Prototype

public static boolean isValidRedirectUrl(String url) 

Source Link

Document

Returns true if the supplied URL starts with a "/" or is absolute.

Usage

From source file:grails.plugin.springsecurity.web.authentication.FilterProcessUrlRequestMatcher.java

public FilterProcessUrlRequestMatcher(String filterProcessesUrl) {
    Assert.hasLength(filterProcessesUrl, "filterProcessesUrl must be specified");
    Assert.isTrue(UrlUtils.isValidRedirectUrl(filterProcessesUrl),
            filterProcessesUrl + " isn't a valid redirect URL");
    this.filterProcessesUrl = filterProcessesUrl;
}

From source file:com.icesoft.spring.security.JsfInvalidSessionStrategy.java

public JsfInvalidSessionStrategy(String invalidSessionUrl) {
    Assert.isTrue(UrlUtils.isValidRedirectUrl(invalidSessionUrl), "url must start with '/' or with 'http(s)'");
    this.invalidSessionUrl = invalidSessionUrl;
}

From source file:org.mitre.openid.connect.filter.MultiUrlRequestMatcher.java

public MultiUrlRequestMatcher(Set<String> filterProcessesUrls) {
    for (String filterProcessesUrl : filterProcessesUrls) {
        Assert.hasLength(filterProcessesUrl, "filterProcessesUrl must be specified");
        Assert.isTrue(UrlUtils.isValidRedirectUrl(filterProcessesUrl),
                filterProcessesUrl + " isn't a valid redirect URL");
    }//from  www  .j  a  va 2 s  . com
    this.filterProcessesUrls = ImmutableSet.copyOf(filterProcessesUrls);
}

From source file:br.com.flucianofeijao.security.JsfLoginUrlAuthenticationEntryPoint.java

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");
    }/*  w w w  .  j av  a2 s .c  om*/
    Assert.notNull(portMapper, "portMapper must be specified");
    Assert.notNull(portResolver, "portResolver must be specified");
}

From source file:br.com.gerenciapessoal.security.JsfLoginUrlAuthenticationEntryPoint.java

@Override
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");
    }/*from w  w w . j  av a  2  s . c  o m*/
    Assert.notNull(portMapper, "portMapper must be specified");
    Assert.notNull(portResolver, "portResolver must be specified");
}

From source file:de.itsvs.cwtrpc.security.AbstractRpcProcessingFilter.java

public void setFilterProcessesUrl(String filterProcessesUrl) {
    Assert.hasText(filterProcessesUrl, "'filterProcessesUrl' must not be null");
    Assert.isTrue(UrlUtils.isValidRedirectUrl(filterProcessesUrl), filterProcessesUrl + " is not a valid URL");
    this.filterProcessesUrl = filterProcessesUrl;
}

From source file:org.xine.marketplace.frontend.views.security.JsfLoginUrlAuthenticationEntryPoint.java

@Override
public void afterPropertiesSet() throws Exception {
    Assert.isTrue(StringUtils.hasText(this.loginFormUrl) && UrlUtils.isValidRedirectUrl(this.loginFormUrl),
            "loginFormUrl must be specified and must be a valid redirect URL");
    if (this.useForward && UrlUtils.isAbsoluteUrl(this.loginFormUrl)) {
        throw new IllegalArgumentException("useForward must be false if using an absolute loginFormURL");
    }/*from   w ww . ja va 2s. c om*/
    Assert.notNull(this.portMapper, "portMapper must be specified");
    Assert.notNull(this.portResolver, "portResolver must be specified");
}

From source file:cn.imethan.common.security.session.ConcurrentSessionFilter.java

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;
}

From source file:br.com.sg.security.SgLoginUrlAuthenticationEntryPoint.java

public void afterPropertiesSet() throws Exception {
    Assert.isTrue(StringUtils.hasText(loginFormUrl) && UrlUtils.isValidRedirectUrl(loginFormUrl),
            "loginFormUrl must be specified and must be a valid redirect URL");
    Assert.notNull(portMapper, "portMapper must be specified");
    Assert.notNull(portResolver, "portResolver must be specified");
}

From source file:cn.imethan.common.security.session.ConcurrentSessionFilter.java

@Override
public void afterPropertiesSet() {
    Assert.notNull(sessionRegistry, "SessionRegistry required");
    Assert.isTrue(expiredUrl == null || UrlUtils.isValidRedirectUrl(expiredUrl),
            expiredUrl + " isn't a valid redirect URL");
}