Skip to content

Instantly share code, notes, and snippets.

Created October 3, 2016 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/17015f5ddbd0c50132fd5a9d05843618 to your computer and use it in GitHub Desktop.
Save anonymous/17015f5ddbd0c50132fd5a9d05843618 to your computer and use it in GitHub Desktop.
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth)
throws Exception {
auth.
inMemoryAuthentication()
;
// YOU MUST SUPPLY USERNAMES AND ROLES
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment