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
## The method used to authenticate the client with the provider. The supported values are client_secret_basic, client_secret_post and none (public clients).
## The method used to authenticate the client with the provider. The supported values are client_secret_basic, client_secret_post, private_key_jwt, client_secret_jwt and none (public clients).
## The OAuth 2.0 Authorization Framework defines four Authorization Grant types. The supported values are authorization_code, client_credentials, password, implicit, as well as, extension grant type urn:ietf:params:oauth:grant-type:jwt-bearer.
The method used to authenticate the Client with the Provider.
1064
-
The supported values are *client_secret_basic*, *client_secret_post* and *none* https://tools.ietf.org/html/rfc6749#section-2.1[(public clients)].
1064
+
The supported values are *client_secret_basic*, *client_secret_post*, *private_key_jwt*, *client_secret_jwt* and *none* https://tools.ietf.org/html/rfc6749#section-2.1[(public clients)].
** <<oauth2Client-registered-authorized-client, Resolving an Authorized Client>>
160
165
* <<oauth2Client-webclient-servlet>>
@@ -207,7 +212,7 @@ public final class ClientRegistration {
207
212
<2> `clientId`: The client identifier.
208
213
<3> `clientSecret`: The client secret.
209
214
<4> `clientAuthenticationMethod`: The method used to authenticate the Client with the Provider.
210
-
The supported values are *client_secret_basic*, *client_secret_post* and *none* https://tools.ietf.org/html/rfc6749#section-2.1[(public clients)].
215
+
The supported values are *client_secret_basic*, *client_secret_post*, *private_key_jwt*, *client_secret_jwt* and *none* https://tools.ietf.org/html/rfc6749#section-2.1[(public clients)].
211
216
<5> `authorizationGrantType`: The OAuth 2.0 Authorization Framework defines four https://tools.ietf.org/html/rfc6749#section-1.3[Authorization Grant] types.
212
217
The supported values are `authorization_code`, `client_credentials`, `password`, as well as, extension grant type `urn:ietf:params:oauth:grant-type:jwt-bearer`.
213
218
<6> `redirectUri`: The client's registered redirect URI that the _Authorization Server_ redirects the end-user's user-agent
@@ -1851,6 +1856,122 @@ class OAuth2ResourceServerController {
1851
1856
====
1852
1857
1853
1858
1859
+
[[oauth2Client-client-auth-support]]
1860
+
=== Client Authentication Support
1861
+
1862
+
1863
+
[[oauth2Client-jwt-bearer-auth]]
1864
+
==== JWT Bearer
1865
+
1866
+
[NOTE]
1867
+
Please refer to JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants for further details on https://datatracker.ietf.org/doc/html/rfc7523#section-2.2[JWT Bearer] Client Authentication.
1868
+
1869
+
The default implementation for JWT Bearer Client Authentication is `NimbusJwtClientAuthenticationParametersConverter`,
1870
+
which is a `Converter` that customizes the Token Request parameters by adding
1871
+
a signed JSON Web Token (JWS) in the `client_assertion` parameter.
1872
+
1873
+
The `java.security.PrivateKey` or `javax.crypto.SecretKey` used for signing the JWS
1874
+
is supplied by the `com.nimbusds.jose.jwk.JWK` resolver associated with `NimbusJwtClientAuthenticationParametersConverter`.
1875
+
1876
+
1877
+
===== Authenticate using `private_key_jwt`
1878
+
1879
+
Given the following Spring Boot 2.x properties for an OAuth 2.0 Client registration:
1880
+
1881
+
[source,yaml]
1882
+
----
1883
+
spring:
1884
+
security:
1885
+
oauth2:
1886
+
client:
1887
+
registration:
1888
+
okta:
1889
+
client-id: okta-client-id
1890
+
client-authentication-method: private_key_jwt
1891
+
authorization-grant-type: authorization_code
1892
+
...
1893
+
----
1894
+
1895
+
The following example shows how to configure `DefaultAuthorizationCodeTokenResponseClient`:
0 commit comments