Last active
November 18, 2016 18:12
-
-
Save geapi/19d8d3fb0f1faa036e9f045e2f8e3209 to your computer and use it in GitHub Desktop.
example SecurityConfig for Spring wit basic auth (locally)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// imports | |
@Configuration | |
@Profile("development") | |
public class DevelopmentSecurityConfig extends WebSecurityConfigurerAdapter { | |
@Autowired | |
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { | |
auth | |
.inMemoryAuthentication() | |
.withUser("user").password("password").roles("USER"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment