Example usage for org.springframework.security.config.annotation.web.builders WebSecurity ignoring

List of usage examples for org.springframework.security.config.annotation.web.builders WebSecurity ignoring

Introduction

In this page you can find the example usage for org.springframework.security.config.annotation.web.builders WebSecurity ignoring.

Prototype

public IgnoredRequestConfigurer ignoring() 

Source Link

Document

Allows adding RequestMatcher instances that Spring Security should ignore.

Usage

From source file:de.knightsoftnet.validationexample.server.spring.WebSecurityConfig.java

/**
 * configure urls which are ignored by security.
 *
 * @param pweb web security config/*from  w w w. j a v a2  s .  co m*/
 */
@Override
public void configure(final WebSecurity pweb) throws Exception { // NOPMD
    pweb.ignoring() //
            .antMatchers("/", //
                    "/index.html", //
                    "/favicon.ico", //
                    "/" + NameTokens.LOGIN, //
                    "/" + NameTokens.SECRET + "/" + NameTokens.LOGIN, //
                    "/" + NameTokens.LOGOUT, //
                    "/" + NameTokens.SEPA, //
                    "/" + NameTokens.ADDRESS, //
                    "/" + NameTokens.PHONE_NUMBER, //
                    "/" + NameTokens.SECRET, //
                    "/" + NameTokens.SETTINGS, //
                    "/gwtBeanValidatorsExample/**");
}

From source file:com.erudika.para.security.SecurityConfig.java

/**
 * Configures the unsecured public resources
 *
 * @param web web sec object//  w  w  w .j  a  v a 2 s .  c  om
 * @throws Exception ex
 */
@Override
public void configure(WebSecurity web) throws Exception {
    web.ignoring().requestMatchers(IgnoredRequestMatcher.INSTANCE);
    //web.debug(true);
}

From source file:com.searchbox.framework.config.SecurityConfig.java

@Override
public void configure(WebSecurity web) throws Exception {
    if (env.getProperty(USE_SECURITY, Boolean.class, false)) {
        web.ignoring().antMatchers("/js/**", "/img/**", "/css/**", "/assets/**", "/static/**");
    } else {//from www  .  ja  v a2 s. c  o  m
        web.ignoring().antMatchers("/**");
    }
}

From source file:it.reply.orchestrator.config.security.WebSecurityConfig.java

@Override
public void configure(WebSecurity webSecurity) throws Exception {
    if (oidcProperties.isEnabled()) {
        webSecurity.ignoring().regexMatchers("/", "/info");
    } else {/*from   w  ww .  ja v  a 2s.c o m*/
        webSecurity.ignoring().anyRequest();
    }
}

From source file:com.frequentis.maritime.mcsr.config.SecurityConfiguration.java

@Override
public void configure(WebSecurity web) throws Exception {
    log.debug("Configuring WebSecurity");
    web.ignoring().antMatchers(HttpMethod.OPTIONS, "/**").antMatchers("/app/**/*.{js,html}")
            .antMatchers("/bower_components/**").antMatchers("/i18n/**").antMatchers("/content/**")
            .antMatchers("/swagger-ui/index.html").antMatchers("/test/**").antMatchers("/h2-console/**");
}

From source file:de.pksoftware.springstrap.core.config.WebSecurityConfigBase.java

@Override
public void configure(WebSecurity web) throws Exception {
    //TODO Make all api calls via /api/**
    //web.ignoring().antMatchers(new String[]{"/apps/**", "/sysapps/**", "/lib/**"});

    web.ignoring().antMatchers(new String[] { "/site/**", "/lib/**" });
}

From source file:olympus.portal.security.WebSecurityConfig.java

@Override
public void configure(WebSecurity web) throws Exception {
    web.ignoring().antMatchers("/*.{js}").antMatchers("/*.{map}").antMatchers("/assets/**")
            .antMatchers("*.{ico}").antMatchers("/index.{html}");
}

From source file:org.ambraproject.wombat.config.SpringSecurityConfiguration.java

@Override
public void configure(WebSecurity web) throws Exception {
    // Allow internal or external resource requests bypass spring security, and thereby avoid the acquisition
    // of default cache control headers which would prevent client-side caching.
    web.ignoring().requestMatchers((RequestMatcher) request -> CACHED_RESOURCE_HANDLERS.stream()
            .map(handlerName -> requestMappingContextDictionary.getPattern(handlerName,
                    siteResolver.resolveSite(request)))
            .filter(Objects::nonNull).map(RequestMappingContext::getPattern)
            .anyMatch(handlerPattern -> ANT_PATH_MATCHER.match(handlerPattern, request.getServletPath())));
}

From source file:org.apache.atlas.web.security.AtlasSecurityConfig.java

@Override
public void configure(WebSecurity web) throws Exception {
    web.ignoring().antMatchers("/login.jsp", "/css/**", "/img/**", "/libs/**", "/js/**", "/ieerror.html",
            "/api/atlas/admin/status", "/api/atlas/admin/metrics");
}

From source file:org.esupportail.publisher.config.SecurityConfiguration.java

@Override
public void configure(WebSecurity web) throws Exception {
    web.ignoring().antMatchers("/scripts/**/*.{js,html}").antMatchers("/bower_components/**")
            .antMatchers("/i18n/**").antMatchers("/assets/**").antMatchers("/swagger-ui/**")
            .antMatchers("/test/**").antMatchers("/console/**");
}