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/manual/src/docs/asciidoc/_includes/servlet/oauth2/oauth2-client.adoc
+23
Original file line number
Diff line number
Diff line change
@@ -407,6 +407,29 @@ A request with the base path `/oauth2/authorization/okta` will initiate the Auth
407
407
The `AuthorizationCodeOAuth2AuthorizedClientProvider` is an implementation of `OAuth2AuthorizedClientProvider` for the Authorization Code grant,
408
408
which also initiates the Authorization Request redirect by the `OAuth2AuthorizationRequestRedirectFilter`.
409
409
410
+
If the OAuth 2.0 Client is a https://tools.ietf.org/html/rfc6749#section-2.1[Public Client], than configure the OAuth 2.0 Client registration as follows:
411
+
412
+
[source,yaml]
413
+
----
414
+
spring:
415
+
security:
416
+
oauth2:
417
+
client:
418
+
registration:
419
+
okta:
420
+
client-id: okta-client-id
421
+
client-authentication-method: none
422
+
authorization-grant-type: authorization_code
423
+
redirect-uri: "{baseUrl}/authorized/okta"
424
+
...
425
+
----
426
+
427
+
Public Clients are supported using https://tools.ietf.org/html/rfc7636[Proof Key for Code Exchange] (PKCE).
428
+
If the client is running in an untrusted environment (eg. native application or web browser-based application) and therefore incapable of maintaining the confidentiality of it's credentials, PKCE will automatically be used when the following conditions are true:
429
+
430
+
. `client-secret` is omitted (or empty)
431
+
. `client-authentication-method` is set to "none" (`ClientAuthenticationMethod.NONE`)
432
+
410
433
The `DefaultOAuth2AuthorizationRequestResolver` also supports `URI` template variables for the `redirect-uri` using `UriComponentsBuilder`.
411
434
412
435
The following configuration uses all the supported `URI` template variables:
0 commit comments