You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/whats-new.adoc
+78
Original file line number
Diff line number
Diff line change
@@ -52,8 +52,86 @@ This aids in migration from earlier versions of Spring Security.
52
52
== OAuth 2.0
53
53
54
54
* `oauth2Login()` now accepts https://github.com/spring-projects/spring-security/pull/15237[`OAuth2AuthorizationRequestResolver` as a `@Bean`]
55
+
* Added `loginPage()` to DSL in reactive `oauth2Login()`
55
56
* OIDC Back-Channel support now accepts https://github.com/spring-projects/spring-security/issues/15003[logout tokens of type `logout+jwt`]
56
57
* `RestClient` can now be xref:servlet/oauth2/index.adoc#oauth2-client-access-protected-resources[configured] with `OAuth2ClientHttpRequestInterceptor` to xref:servlet/oauth2/index.adoc#oauth2-client-accessing-protected-resources-example[make protected resources requests]
58
+
* Added `RestClient`-based implementations of `OAuth2AccessTokenResponseClient` for more consistent configuration of access token requests.
59
+
+
60
+
To opt-in to using `RestClient` support, simply publish a bean for each grant type as in the following example:
61
+
+
62
+
[tabs]
63
+
======
64
+
Java::
65
+
+
66
+
[source,java,role="primary"]
67
+
----
68
+
@Configuration
69
+
public class SecurityConfig {
70
+
71
+
@Bean
72
+
public OAuth2AccessTokenResponseClient<OAuth2AuthorizationCodeGrantRequest> authorizationCodeAccessTokenResponseClient() {
73
+
return new RestClientAuthorizationCodeTokenResponseClient();
74
+
}
75
+
76
+
@Bean
77
+
public OAuth2AccessTokenResponseClient<OAuth2RefreshTokenGrantRequest> refreshTokenAccessTokenResponseClient() {
78
+
return new RestClientRefreshTokenTokenResponseClient();
79
+
}
80
+
81
+
@Bean
82
+
public OAuth2AccessTokenResponseClient<OAuth2ClientCredentialsGrantRequest> clientCredentialsAccessTokenResponseClient() {
83
+
return new RestClientClientCredentialsTokenResponseClient();
84
+
}
85
+
86
+
@Bean
87
+
public OAuth2AccessTokenResponseClient<JwtBearerGrantRequest> jwtBearerAccessTokenResponseClient() {
88
+
return new RestClientJwtBearerTokenResponseClient();
89
+
}
90
+
91
+
@Bean
92
+
public OAuth2AccessTokenResponseClient<TokenExchangeGrantRequest> tokenExchangeAccessTokenResponseClient() {
93
+
return new RestClientTokenExchangeTokenResponseClient();
94
+
}
95
+
96
+
}
97
+
----
98
+
99
+
Kotlin::
100
+
+
101
+
[source,kotlin,role="secondary"]
102
+
----
103
+
@Configuration
104
+
class SecurityConfig {
105
+
106
+
@Bean
107
+
fun authorizationCodeAccessTokenResponseClient(): OAuth2AccessTokenResponseClient<OAuth2AuthorizationCodeGrantRequest> {
0 commit comments