Skip to content

Commit f8a78f1

Browse files
committed
Update What's New
1 parent 8bab9bc commit f8a78f1

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed

docs/modules/ROOT/pages/whats-new.adoc

+78
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,86 @@ This aids in migration from earlier versions of Spring Security.
5252
== OAuth 2.0
5353

5454
* `oauth2Login()` now accepts https://github.com/spring-projects/spring-security/pull/15237[`OAuth2AuthorizationRequestResolver` as a `@Bean`]
55+
* Added `loginPage()` to DSL in reactive `oauth2Login()`
5556
* OIDC Back-Channel support now accepts https://github.com/spring-projects/spring-security/issues/15003[logout tokens of type `logout+jwt`]
5657
* `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> {
108+
return RestClientAuthorizationCodeTokenResponseClient()
109+
}
110+
111+
@Bean
112+
fun refreshTokenAccessTokenResponseClient(): OAuth2AccessTokenResponseClient<OAuth2RefreshTokenGrantRequest> {
113+
return RestClientRefreshTokenTokenResponseClient()
114+
}
115+
116+
@Bean
117+
fun clientCredentialsAccessTokenResponseClient(): OAuth2AccessTokenResponseClient<OAuth2ClientCredentialsGrantRequest> {
118+
return RestClientClientCredentialsTokenResponseClient()
119+
}
120+
121+
@Bean
122+
fun jwtBearerAccessTokenResponseClient(): OAuth2AccessTokenResponseClient<JwtBearerGrantRequest> {
123+
return RestClientJwtBearerTokenResponseClient()
124+
}
125+
126+
@Bean
127+
fun tokenExchangeAccessTokenResponseClient(): OAuth2AccessTokenResponseClient<TokenExchangeGrantRequest> {
128+
return RestClientTokenExchangeTokenResponseClient()
129+
}
130+
131+
}
132+
----
133+
======
134+
* Deprecated `Default*` implementations of `OAuth2AccessTokenResponseClient`
57135

58136
== SAML 2.0
59137

0 commit comments

Comments
 (0)