Update authorizeHttpRequests

Closes gh-49
This commit is contained in:
Josh Cummings
2021-11-10 10:20:09 -07:00
parent 3a58daf55d
commit ca32d8e45d
19 changed files with 19 additions and 19 deletions

View File

@@ -72,7 +72,7 @@ public class OAuth2AuthorizationServerSecurityConfiguration {
public SecurityFilterChain standardSecurityFilterChain(HttpSecurity http) throws Exception {
// @formatter:off
http
.authorizeRequests((authorize) -> authorize
.authorizeHttpRequests((authorize) -> authorize
.anyRequest().authenticated()
)
.formLogin(Customizer.withDefaults());

View File

@@ -334,7 +334,7 @@ public class OAuth2LoginApplicationTests {
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests((authorize) -> authorize
.authorizeHttpRequests((authorize) -> authorize
.anyRequest().authenticated()
)
.oauth2Login((oauth2) -> oauth2

View File

@@ -40,7 +40,7 @@ public class OAuth2ResourceServerSecurityConfiguration extends WebSecurityConfig
protected void configure(HttpSecurity http) throws Exception {
// @formatter:off
http
.authorizeRequests((authorize) -> authorize
.authorizeHttpRequests((authorize) -> authorize
.antMatchers(HttpMethod.GET, "/message/**").hasAuthority("SCOPE_message:read")
.antMatchers(HttpMethod.POST, "/message/**").hasAuthority("SCOPE_message:write")
.anyRequest().authenticated()

View File

@@ -72,7 +72,7 @@ public class OAuth2ResourceServerSecurityConfiguration extends WebSecurityConfig
protected void configure(HttpSecurity http) throws Exception {
// @formatter:off
http
.authorizeRequests((authorize) -> authorize
.authorizeHttpRequests((authorize) -> authorize
.antMatchers("/message/**").hasAuthority("SCOPE_message:read")
.anyRequest().authenticated()
)

View File

@@ -47,7 +47,7 @@ public class OAuth2ResourceServerSecurityConfiguration {
AuthenticationManagerResolver<HttpServletRequest> authenticationManagerResolver) throws Exception {
// @formatter:off
http
.authorizeRequests((authorize) -> authorize
.authorizeHttpRequests((authorize) -> authorize
.mvcMatchers("/**/message/**").hasAuthority("SCOPE_message:read")
.anyRequest().authenticated()
)

View File

@@ -42,7 +42,7 @@ public class OAuth2ResourceServerSecurityConfiguration extends WebSecurityConfig
protected void configure(HttpSecurity http) throws Exception {
// @formatter:off
http
.authorizeRequests((authorize) -> authorize
.authorizeHttpRequests((authorize) -> authorize
.mvcMatchers(HttpMethod.GET, "/message/**").hasAuthority("SCOPE_message:read")
.mvcMatchers(HttpMethod.POST, "/message/**").hasAuthority("SCOPE_message:write")
.anyRequest().authenticated()

View File

@@ -40,7 +40,7 @@ public class OAuth2ResourceServerSecurityConfiguration extends WebSecurityConfig
protected void configure(HttpSecurity http) throws Exception {
// @formatter:off
http
.authorizeRequests((authorize) -> authorize
.authorizeHttpRequests((authorize) -> authorize
.mvcMatchers("/message/**").hasAuthority("SCOPE_message:read")
.anyRequest().authenticated()
)

View File

@@ -38,7 +38,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
protected void configure(HttpSecurity http) throws Exception {
// @formatter:off
http
.authorizeRequests((authorize) -> authorize
.authorizeHttpRequests((authorize) -> authorize
.mvcMatchers("/", "/public/**").permitAll()
.anyRequest().authenticated()
)