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/client.adoc
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -214,6 +214,27 @@ spring:
214
214
215
215
The `spring.cloud.config.password` and `spring.cloud.config.username` values override anything that is provided in the URI.
216
216
217
+
If you use OAuth2 security on the server, clients need to know the client ID and client secret.
218
+
You can specify the client ID and client secret via separate properties, as shown in the following example:
219
+
220
+
[source,yaml]
221
+
----
222
+
223
+
spring:
224
+
cloud:
225
+
config:
226
+
uri: https://myconfig.mycompany.com
227
+
oauth2:
228
+
enabled: true
229
+
provider:
230
+
token-uri: https://auth.acme.com/oauth/token
231
+
registration:
232
+
client-id: client-id
233
+
client-secret: client-secret
234
+
authorization-grant-type: client_credentials
235
+
236
+
----
237
+
217
238
If you deploy your apps on Cloud Foundry, the best way to provide the password is through service credentials (such as in the URI, since it does not need to be in a config file).
218
239
The following example works locally and for a user-provided service on Cloud Foundry named `configserver`:
0 commit comments