In-Memory User Store Example
Jump to navigation
Jump to search
Internal
@Configuration
@EnableWebSecurity
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.
inMemoryAuthentication().
withUser("alice").
password("alice123").
authorities("ROLE_USER").
and().
withUser("bob").
password("bob123").
authorities("ROLE_USER");
}
}