Created
November 18, 2016 19:10
-
-
Save tygern/3dc7a3d3e145f6c541c0f54873e9d18f to your computer and use it in GitHub Desktop.
security config
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
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