From 5aa0ec6ec02cca8202515bdbe308624f89945efe Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Tue, 28 Jun 2016 13:22:03 +0200 Subject: [PATCH] Update topics/client-registration.adoc --- topics/client-registration.adoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/topics/client-registration.adoc b/topics/client-registration.adoc index cd28d31058..17a177ddd4 100644 --- a/topics/client-registration.adoc +++ b/topics/client-registration.adoc @@ -149,7 +149,10 @@ String token = "eyJhbGciOiJSUz..."; ClientRepresentation client = new ClientRepresentation(); client.setClientId(CLIENT_ID); -ClientRegistration reg = ClientRegistration.create().url("http://localhost:8080/auth/realms/myrealm/clients").build(); +ClientRegistration reg = ClientRegistration.create() + .url("http://localhost:8080/auth", "myrealm") + .build(); + reg.auth(Auth.token(token)); client = reg.create(client);