Authentication

  1. Back in JBDS, double-click camel-context.xml file.
  2. Click on the Source tab.
  3. Locate the <camelContext> element.
  4. Copy and paste the following XML code:
<bean id="loginService" class="org.eclipse.jetty.plus.jaas.JAASLoginService">
general_info_polished.png 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).
  1. Click on the Design tab.
  2. Click on the jetty component and click on the Properties tab.
  3. Append the following to the URI: “&handlers=securityHandler”

  1. Save the file (Ctrl+S).
  2. Double-click on the pom.xml file.
  3. Click on the pom.xml tab.
  4. Locate the <Import-Package> element.
  5. Copy and paste the following packages in the <Import-Package> element:
javax.security.auth,

  1. Save the file (Ctrl+S).
  2. Right-click on the Lab12 project, “Run As” -> “Maven build”.
  3. Go to the web console and Click on the Profiles tab.
  4. Search for the lab12Profile and click on the details.. link.

  1. Click on the Refresh button.

  1. Switch to a web browser and open a new tab.
  2. Go to https://localhost:8282/services .
  3. Login with admin/admin.

results matching ""

    No results matching ""