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/src/main/asciidoc/security-oidc-bearer-token-authentication-tutorial.adoc
+23-27Lines changed: 23 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -198,14 +198,33 @@ For more information, see the <<bearer-token-tutorial-keycloak-dev-mode>> sectio
198
198
For more information, see the Quarkus xref:security-oidc-configuration-properties-reference.adoc[OpenID Connect (OIDC) configuration properties] guide.
199
199
200
200
201
-
== Start and configure the Keycloak server
201
+
[[bearer-token-tutorial-keycloak-dev-mode]]
202
+
== Run the application in dev mode
202
203
203
-
. Put the link:{quickstarts-tree-url}/security-openid-connect-quickstart/config/quarkus-realm.json[realm configuration file] on the classpath (`target/classes` directory) so that it gets imported automatically when running in dev mode.
204
-
You do not need to do this if you have already built a link:{quickstarts-tree-url}/security-openid-connect-quickstart[complete solution], in which case, this realm file is added to the classpath during the build.
204
+
Put the link:{quickstarts-tree-url}/security-openid-connect-quickstart/config/quarkus-realm.json[realm configuration file] in the `src/main/resources` application folder so that it gets copied to the classpath and imported automatically to Keycloak. You do not need to do this if you have already built a link:{quickstarts-tree-url}/security-openid-connect-quickstart[complete solution], in which case, this realm file is added to the classpath during the build.
205
+
206
+
. To run the application in dev mode, run the following commands:
205
207
+
208
+
====
209
+
include::{includes}/devtools/dev.adoc[]
210
+
====
211
+
* xref:security-openid-connect-dev-services.adoc[Dev Services for Keycloak] will start a Keycloak container and import a `quarkus-realm.json`.
212
+
. Open a xref:dev-ui.adoc[Dev UI], which you can find at http://localhost:8080/q/dev-ui[/q/dev-ui].
213
+
Then, in an `OpenID Connect` card, click the `Keycloak provider` link .
214
+
. When prompted to log in to a `Single Page Application` provided by `OpenID Connect Dev UI`, do the following steps:
215
+
216
+
* Log in as `alice` (password: `alice`), who has a `user` role.
217
+
** Accessing `/api/admin` returns a `403` status code.
218
+
** Accessing `/api/users/me` returns a `200` status code.
219
+
* Log out and log in again as `admin` (password: `admin`), who has both `admin` and `user` roles.
220
+
** Accessing `/api/admin` returns a `200` status code.
221
+
** Accessing `/api/users/me` returns a `200` status code.
222
+
223
+
== Start and configure the Keycloak server
224
+
206
225
[NOTE]
207
226
====
208
-
Do not start the Keycloak server when you run the application in dev mode; `Dev Services for Keycloak` will start a container.
227
+
Do not start the Keycloak server when you <<bearer-token-tutorial-keycloak-dev-mode,run the application in dev mode>>; `Dev Services for Keycloak` will start and configure a container.
209
228
For more information, see the <<bearer-token-tutorial-keycloak-dev-mode>> section.
210
229
====
211
230
+
@@ -246,31 +265,8 @@ For more information, see the xref:security-keycloak-admin-client.adoc[Quarkus K
246
265
endif::no-quarkus-keycloak-admin-client[]
247
266
248
267
249
-
250
-
[[bearer-token-tutorial-keycloak-dev-mode]]
251
-
== Run the application in dev mode
252
-
253
-
. To run the application in dev mode, run the following commands:
254
-
+
255
-
====
256
-
include::{includes}/devtools/dev.adoc[]
257
-
====
258
-
* xref:security-openid-connect-dev-services.adoc[Dev Services for Keycloak] will start a Keycloak container and import a `quarkus-realm.json`.
259
-
. Open a xref:dev-ui.adoc[Dev UI], which you can find at http://localhost:8080/q/dev-ui[/q/dev-ui].
260
-
Then, in an `OpenID Connect` card, click the `Keycloak provider` link .
261
-
. When prompted to log in to a `Single Page Application` provided by `OpenID Connect Dev UI`, do the following steps:
262
-
263
-
* Log in as `alice` (password: `alice`), who has a `user` role.
264
-
** Accessing `/api/admin` returns a `403` status code.
265
-
** Accessing `/api/users/me` returns a `200` status code.
266
-
* Log out and log in again as `admin` (password: `admin`), who has both `admin` and `user` roles.
267
-
** Accessing `/api/admin` returns a `200` status code.
268
-
** Accessing `/api/users/me` returns a `200` status code.
269
-
270
268
== Run the Application in JVM mode
271
269
272
-
When you are done with dev mode, you can run the application as a standard Java application.
0 commit comments