Skip to content

Instantly share code, notes, and snippets.

View mrbusche's full-sized avatar

Matt Busche mrbusche

View GitHub Profile
@mrbusche
mrbusche / ApiSecurityConfig.groovy
Created September 18, 2017 02:32 — forked from jeffsheets/ApiSecurityConfig.groovy
Spock Test for Spring Boot Security configuration - showing basic simple examples for unauthenticated users, role based access, and httpBasic logins
@EnableWebSecurity
class ApiSecurityConfig extends WebSecurityConfigurerAdapter {
@Inject
void configureGlobal(AuthenticationManagerBuilder auth) {
auth.inMemoryAuthentication()
.withUser('svc_acct').password('somePassword').roles('FULL_ACCESS')
}
@Override
protected void configure(HttpSecurity http) {