Start building against Spring Authorization Server 1.4.0 snapshots
See gh-42559
This commit is contained in:
parent
70c1cabe66
commit
11960df595
|
|
@ -28,7 +28,6 @@ import org.springframework.core.annotation.Order;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||||
import org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository;
|
import org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository;
|
||||||
import org.springframework.security.oauth2.server.authorization.config.annotation.web.configuration.OAuth2AuthorizationServerConfiguration;
|
|
||||||
import org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2AuthorizationServerConfigurer;
|
import org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2AuthorizationServerConfigurer;
|
||||||
import org.springframework.security.oauth2.server.authorization.settings.AuthorizationServerSettings;
|
import org.springframework.security.oauth2.server.authorization.settings.AuthorizationServerSettings;
|
||||||
import org.springframework.security.web.SecurityFilterChain;
|
import org.springframework.security.web.SecurityFilterChain;
|
||||||
|
|
@ -51,7 +50,11 @@ class OAuth2AuthorizationServerWebSecurityConfiguration {
|
||||||
@Bean
|
@Bean
|
||||||
@Order(Ordered.HIGHEST_PRECEDENCE)
|
@Order(Ordered.HIGHEST_PRECEDENCE)
|
||||||
SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity http) throws Exception {
|
SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity http) throws Exception {
|
||||||
OAuth2AuthorizationServerConfiguration.applyDefaultSecurity(http);
|
OAuth2AuthorizationServerConfigurer authorizationServer = OAuth2AuthorizationServerConfigurer
|
||||||
|
.authorizationServer();
|
||||||
|
http.securityMatcher(authorizationServer.getEndpointsMatcher());
|
||||||
|
http.with(authorizationServer, withDefaults());
|
||||||
|
http.authorizeHttpRequests((authorize) -> authorize.anyRequest().authenticated());
|
||||||
http.getConfigurer(OAuth2AuthorizationServerConfigurer.class).oidc(withDefaults());
|
http.getConfigurer(OAuth2AuthorizationServerConfigurer.class).oidc(withDefaults());
|
||||||
http.oauth2ResourceServer((resourceServer) -> resourceServer.jwt(withDefaults()));
|
http.oauth2ResourceServer((resourceServer) -> resourceServer.jwt(withDefaults()));
|
||||||
http.exceptionHandling((exceptions) -> exceptions.defaultAuthenticationEntryPointFor(
|
http.exceptionHandling((exceptions) -> exceptions.defaultAuthenticationEntryPointFor(
|
||||||
|
|
|
||||||
|
|
@ -1913,7 +1913,7 @@ bom {
|
||||||
releaseNotes("https://github.com/spring-projects/spring-amqp/releases/tag/v{version}")
|
releaseNotes("https://github.com/spring-projects/spring-amqp/releases/tag/v{version}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
library("Spring Authorization Server", "1.4.0-M2") {
|
library("Spring Authorization Server", "1.4.0-SNAPSHOT") {
|
||||||
considerSnapshots()
|
considerSnapshots()
|
||||||
group("org.springframework.security") {
|
group("org.springframework.security") {
|
||||||
modules = [
|
modules = [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue