I am using Spring Security for basic authentication to secure my REST APIs. 

Below is the configuration code:

```java
@Configuration
@EnableWebSecurity
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {

    @Autowired
    public void configureGlobalSecurity(AuthenticationManagerBuilder auth) throws Exception {
        auth
            .inMemoryAuthentication()
                .withUser("user")
                    .password("password")
                    .roles("admin");
    }

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

        http
            .csrf().disable()
            .authorizeRequests()
                .anyRequest().authenticated();
    }
}

```

I am getting forbidden (403) error on authenticating myself using the correct username and password. 

[![enter image description here](https://i.stack.imgur.com/ItIK7.png)](https://i.stack.imgur.com/ItIK7.png)

Please suggest the modifications to get it working.