Authentication
- Back in JBDS, double-click camel-context.xml file.
- Click on the Source tab.
- Locate the <camelContext> element.
- Copy and paste the following XML code:
<bean id="loginService" class="org.eclipse.jetty.plus.jaas.JAASLoginService"> |
|
|
The loginService bean defines the login module to use, in this case we use a JAAS login service, the “karaf” realm (included out of the box that uses the users.properties file to store users, passwords and roles). |
|
- Click on the Design tab.
- Click on the jetty component and click on the Properties tab.
- Append the following to the URI: “&handlers=securityHandler”
- Save the file (Ctrl+S).
- Double-click on the pom.xml file.
- Click on the pom.xml tab.
- Locate the <Import-Package> element.
- Copy and paste the following packages in the <Import-Package> element:
- Save the file (Ctrl+S).
- Right-click on the Lab12 project, “Run As” -> “Maven build”.
- Go to the web console and Click on the Profiles tab.
- Search for the lab12Profile and click on the details.. link.
- Click on the Refresh button.
- Switch to a web browser and open a new tab.
- Go to https://localhost:8282/services .
- Login with admin/admin.