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/guides/how-to-dynamic-client-registration.adoc
+45-59Lines changed: 45 additions & 59 deletions
Original file line number
Diff line number
Diff line change
@@ -3,60 +3,50 @@
3
3
:index-link: ../how-to.html
4
4
:docs-dir: ..
5
5
6
-
This guide shows how to configure OpenID Connect Dynamic Client Registration 1.0 in Spring Authorization Server and walks through an example of how to register a client.
7
-
Spring Authorization Server implements https://openid.net/specs/openid-connect-registration-1_0.html[OpenID Connect Dynamic Client Registration 1.0]
8
-
specification, gaining the ability to dynamically register and retrieve OpenID clients.
6
+
This guide shows how to configure OpenID Connect Dynamic Client Registration in Spring Authorization Server and walks through an example of how to register a client.
7
+
Spring Authorization Server implements the https://openid.net/specs/openid-connect-registration-1_0.html[OpenID Connect Dynamic Client Registration 1.0] specification, providing the capability to dynamically register and retrieve OpenID Connect clients.
<1> Add a `SecurityFilterChain` `@Bean` that registers an `OAuth2AuthorizationServerConfigurer`
28
-
<2> In the configurer, apply OIDC client registration endpoint customizer with default values.
29
-
This enables dynamic client registration functionality.
26
+
<1> Enable the xref:protocol-endpoints.adoc#oidc-client-registration-endpoint[OpenID Connect 1.0 Client Registration Endpoint] with the default configuration.
30
27
31
-
Please refer to xref:protocol-endpoints.adoc#oidc-client-registration-endpoint[Client Registration Endpoint docs] for in-depth configuration details.
28
+
[[configure-client-registrar]]
29
+
== Configure client registrar
32
30
33
-
[[configure-initial-client]]
34
-
== Configure initial client
31
+
An existing client is used to register new clients with the authorization server.
32
+
The client must be configured with scopes `client.create` and optionally `client.read` for registering clients and retrieving clients, respectively.
33
+
The following listing shows an example client:
35
34
36
-
An initial client is required in order to register new clients in the authorization server.
37
-
The client must be configured with scopes `client.create` and optionally `client.read` for creating clients and reading clients, respectively.
You may add additional fields as per https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationRequest[OpenID Connect Dynamic Client Registration 1.0 spec - Client Registration Request].
103
-
<2> A minimal client registration response object.
104
-
You may add additional response fields as per https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationResponse[OpenID Connect Dynamic Client Registration 1.0 spec - Client Registration Response].
105
-
<3> A sample client registration request object which will be used to register a sample client.
106
-
<4> Example dynamic client registration procedure, demonstrating dynamic registration and client retrieval.
107
-
<5> Register a client using sample request from step 2, using initial access token from previous step.
108
-
Skip to step 10 for implementation.
109
-
<6> After registration, assert on the fields that should be populated in the response upon successful registration.
110
-
<7> Extract `registration_access_token` and `registration_client_uri` fields, for use in retrieval of the newly registered client.
111
-
<8> Retrieve client. Skip to step 11 for implementation.
112
-
<9> After client retrieval, assert on the fields that should be populated in the response.
113
-
<10> Sample client registration procedure using Spring WebFlux's `WebClient`.
114
-
Note that the `WebClient` must have `baseUrl` of the authorization server configured.
115
-
<11> Sample client retrieval procedure using Spring WebFlux's `WebClient`.
116
-
Note that the `WebClient` must have `baseUrl` of the authorization server configured.
117
-
118
-
The retrieve client response should contain the same information about the client as seen when the client was first
119
-
registered, except for `registration_access_token` field.
92
+
<1> A minimal representation of a client registration request. You may add additional client metadata parameters as per https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationRequest[Client Registration Request].
93
+
<2> A minimal representation of a client registration response. You may add additional client metadata parameters as per https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationResponse[Client Registration Response].
94
+
<3> Example demonstrating client registration and client retrieval.
95
+
<4> A sample client registration request object.
96
+
<5> Register the client using the "initial" access token and client registration request object.
97
+
<6> After successful registration, assert on the client metadata parameters that should be populated in the response.
98
+
<7> Extract `registration_access_token` and `registration_client_uri` response parameters, for use in retrieval of the newly registered client.
99
+
<8> Retrieve the client using the `registration_access_token` and `registration_client_uri`.
100
+
<9> After client retrieval, assert on the client metadata parameters that should be populated in the response.
101
+
<10> Sample https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationRequest[Client Registration Request] using `WebClient`.
102
+
<11> Sample https://openid.net/specs/openid-connect-registration-1_0.html#ReadRequest[Client Read Request] using `WebClient`.
103
+
104
+
[NOTE]
105
+
The https://openid.net/specs/openid-connect-registration-1_0.html#ReadResponse[Client Read Response] should contain the same client metadata parameters as the https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationResponse[Client Registration Response], except the `registration_access_token` parameter.
0 commit comments