Last active
August 23, 2023 08:56
-
-
Save baso53/5d672dce9bd7bc6baacea83af4c9235a to your computer and use it in GitHub Desktop.
This file contains 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
@Configuration | |
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter { | |
@Override | |
protected void configure(HttpSecurity http) throws Exception { | |
http.authorizeRequests() | |
.anyRequest() | |
.authenticated(); | |
http.oauth2ResourceServer() | |
.jwt(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just in case someone is coming from the article in Spring Security 6.1.x it will look like: