title: 403 Forbidden even I granted access
body: <p>I created a project using spring security.</p>
  
  <p>In <code>configure(HttpSecurity http)</code> I set access to <code>"/home"</code> just for USER, but after I login, it shows: </p>
  
  <blockquote>
    <p>403 Forbidden</p>
  </blockquote>
  
  <p><br>
  I created an <code>Entity class named User implementing UserDetails</code> and in <code>getAuthorities()</code> I just retrun <code>Arrays.asList(new SimpleGrantedAuthority("USER"));</code></p>
  
  <p>For http object, I tried using directly <code>.hasRole('USER')</code> method instead of <code>.access("hasRole('USER')")</code>, the problem is the same.</p>
  
  <pre><code>@Override
  protected void configure(HttpSecurity http) throws Exception{
      http
          .authorizeRequests()
           .antMatchers("/home")
            .access("hasRole('USER')")
            .antMatchers("/","/**").access("permitAll")
            .anyRequest().authenticated()
            .and()
              .formLogin()
              .and()
          .httpBasic();
  }
  </code></pre>