Skip to content

Commit ceaac98

Browse files
committed
Update docs with OIDC provider configuration
See gh-13210
1 parent 6333edb commit ceaac98

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientProperties.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,7 @@ public static class Provider {
209209
private String jwkSetUri;
210210

211211
/**
212-
* URI that an OpenID Connect Provider asserts as its Issuer Identifier. If the
213-
* issuer provided is "https://example.com", then an "OpenID Provider
214-
* Configuration Request" will be made to
215-
* "https://example.com/.well-known/openid-configuration". The result is expected
216-
* to be an "OpenID Provider Configuration Response".
212+
* URI that an OpenID Connect Provider asserts as its Issuer Identifier.
217213
*/
218214
private String issuerUri;
219215

spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3240,6 +3240,21 @@ In other words, the two configurations in the following example use the Google p
32403240
spring.security.oauth2.client.registration.google.client-secret=password
32413241
----
32423242

3243+
For OpenID Connect providers that support https://openid.net/specs/openid-connect-discovery-1_0.html[OpenID Connect discovery],
3244+
the configuration can be further simplified. The provider needs to be configured with an `issuer-uri` which is the
3245+
URI that the it asserts as its Issuer Identifier. For example, if the
3246+
`issuer-uri` provided is "https://example.com", then an `OpenID Provider Configuration Request`
3247+
will be made to "https://example.com/.well-known/openid-configuration". The result is expected
3248+
to be an `OpenID Provider Configuration Response`. The following example shows how an OpenID Connect
3249+
Provider can be configured with the `issuer-uri`:
3250+
3251+
[source,properties,indent=0]
3252+
----
3253+
spring.security.oauth2.client.registration.oidc-provider.client-id=abcd
3254+
spring.security.oauth2.client.registration.oidc-provider.client-secret=password
3255+
spring.security.oauth2.client.provider.oidc-provider.issuer-uri=https://dev-123456.oktapreview.com/oauth2/default/
3256+
----
3257+
32433258

32443259

32453260
[[boot-features-security-oauth2-server]]

0 commit comments

Comments
 (0)