Skip to content

Instantly share code, notes, and snippets.

@tygern
Created November 18, 2016 19:10
Show Gist options
  • Save tygern/3dc7a3d3e145f6c541c0f54873e9d18f to your computer and use it in GitHub Desktop.
Save tygern/3dc7a3d3e145f6c541c0f54873e9d18f to your computer and use it in GitHub Desktop.
security config
package tips.cloudnative.security;
import org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
@Configuration
@EnableOAuth2Sso
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
public void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().anyRequest().authenticated();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment