Package org.springframework.security.web.util.matcher

Examples of org.springframework.security.web.util.matcher.RequestMatcher


    }

    CachedCsrfTokenRepository str = new CachedCsrfTokenRepository();
    Para.injectInto(str);

    http.csrf().requireCsrfProtectionMatcher(new RequestMatcher() {
      private Pattern allowedMethods = Pattern.compile("^(GET|HEAD|TRACE|OPTIONS)$");

      public boolean matches(HttpServletRequest request) {
        return !RestRequestMatcher.INSTANCE.matches(request)
            && !allowedMethods.matcher(request.getMethod()).matches();
View Full Code Here


  }

  @Profile("test")
  @Bean(name = "csrfMatcher")
  public RequestMatcher testCsrfMatcher() {
    return new RequestMatcher() {

      @Override
      public boolean matches(HttpServletRequest request) {
        return false;
      }
View Full Code Here

  public RequestMatcher csrfMatcher() {
    /**
     * Copy of default request matcher from
     * CsrfFilter$DefaultRequiresCsrfMatcher
     */
    return new RequestMatcher() {
      private Pattern allowedMethods = Pattern
        .compile("^(GET|HEAD|TRACE|OPTIONS)$");

      /*
       * (non-Javadoc)
 
View Full Code Here

    }

    CachedCsrfTokenRepository str = new CachedCsrfTokenRepository();
    Para.injectInto(str);

    http.csrf().requireCsrfProtectionMatcher(new RequestMatcher() {
      private Pattern allowedMethods = Pattern.compile("^(GET|HEAD|TRACE|OPTIONS)$");

      public boolean matches(HttpServletRequest request) {
        return !RestRequestMatcher.INSTANCE.matches(request)
            && !allowedMethods.matcher(request.getMethod()).matches();
View Full Code Here

  private String realm;

  @Override
  protected void configure(HttpSecurity http) throws Exception {

    final RequestMatcher textHtmlMatcher = new MediaTypeRequestMatcher(contentNegotiationStrategy,
        MediaType.TEXT_HTML);

    final String loginPage = "/admin-ui/login";

    BasicAuthenticationEntryPoint basicAuthenticationEntryPoint = new BasicAuthenticationEntryPoint();
View Full Code Here

    }

    CachedCsrfTokenRepository str = new CachedCsrfTokenRepository();
    Para.injectInto(str);

    http.csrf().requireCsrfProtectionMatcher(new RequestMatcher() {
      private Pattern allowedMethods = Pattern.compile("^(GET|HEAD|TRACE|OPTIONS)$");

      public boolean matches(HttpServletRequest request) {
        return !RestRequestMatcher.INSTANCE.matches(request)
            && !allowedMethods.matcher(request.getMethod()).matches();
View Full Code Here

  @Order(SecurityProperties.BASIC_AUTH_ORDER)
  protected static class ApplicationNoWebSecurityConfigurerAdapter extends
      WebSecurityConfigurerAdapter {
    @Override
    protected void configure(HttpSecurity http) throws Exception {
      http.requestMatcher(new RequestMatcher() {
        @Override
        public boolean matches(HttpServletRequest request) {
          return false;
        }
      });
View Full Code Here

  /**
   * Default constructor.
   * @param defaultFilterProcessesUrl the url of the filter
   */
  public OpenIDAuthFilter(final String defaultFilterProcessesUrl) {
    setRequiresAuthenticationRequestMatcher(new RequestMatcher() {
      public boolean matches(HttpServletRequest request) {
        String uri = request.getRequestURI();
        boolean matches;
        if ("".equals(request.getContextPath())) {
          matches = uri.endsWith(defaultFilterProcessesUrl);
View Full Code Here

    }

    CachedCsrfTokenRepository str = new CachedCsrfTokenRepository();
    Para.injectInto(str);

    http.csrf().requireCsrfProtectionMatcher(new RequestMatcher() {
      private Pattern allowedMethods = Pattern.compile("^(GET|HEAD|TRACE|OPTIONS)$");

      public boolean matches(HttpServletRequest request) {
        return !RestRequestMatcher.INSTANCE.matches(request)
            && !allowedMethods.matcher(request.getMethod()).matches();
View Full Code Here

TOP

Related Classes of org.springframework.security.web.util.matcher.RequestMatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.