keycloak-scim/getting_started/topics/sample-app/proc-installing-sample-code.adoc

55 lines
1.8 KiB
Text
Raw Normal View History

2016-05-11 02:48:33 +00:00
[id="installing-sample-code_{context}"]
= Installing sample code to secure the application
2016-05-11 02:48:33 +00:00
The final procedure is to make this application secure by installing some sample code from the {quickstartRepo_link} repository. The quickstarts work with the most recent {project_name} release.
2016-05-11 02:48:33 +00:00
The sample code is the *app-profile-jee-vanilla* quickstart. It demonstrates how to change a Jakarta EE application that is secured with basic authentication without changing the WAR. The {project_name} client adapter subsystem changes the authentication method and injects the configuration.
.Prerequisites
2017-08-30 11:46:49 +00:00
You have the following installed on your machine and available in your PATH.
* Java JDK 8
* Apache Maven 3.1.1 or higher
* Git
2017-08-30 11:46:49 +00:00
You have a *keycloak.json* file.
.Procedure
2016-05-11 02:48:33 +00:00
. Make sure your {appserver_name} application server is started.
. Download the code and change directories using the following commands.
+
2016-06-09 10:09:53 +00:00
[source, subs="attributes"]
2016-05-11 02:48:33 +00:00
----
2017-08-28 12:50:14 +00:00
$ git clone {quickstartRepo_link}
$ cd {quickstartRepo_dir}/app-profile-jee-vanilla/config
2016-05-11 02:48:33 +00:00
----
. Copy the `keycloak.json` file to the current directory.
2016-05-11 02:48:33 +00:00
. Move one level up to the `app-profile-jee-vanilla` directory.
2016-05-11 02:48:33 +00:00
. Install the code using the following command.
+
[source, subs="attributes"]
----
$ mvn clean wildfly:deploy
----
2016-05-11 02:48:33 +00:00
. Confirm that the application installation succeeded. Go to http://localhost:8080/vanilla where a login page is displayed.
+
.Login page confirming success
image:images/vanilla.png[Login page confirming success]
. Log in using the account that you created in the demo realm.
+
.Login page to demo realm
image:images/demo-login.png[Login page to demo realm]
+
A message appears indicating you have completed a successful use of {project_name} to protect a sample {appserver_name} application. Congratulations!
+
.Complete success
image:images/success.png[Complete success]