Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the asciidoc in the repository: https://github.com/apache/camel/blob/master/README.md https://github.com/apache/camel/blob/master/components/readme.adoc
Spring Security Example
The camel-spring-security module provides authentication and authorization capabilities via Spring Security. This example shows you how to use this functionality to implement a role based authorization application.
This example consumes messages from a servlet endpoint which is secured by Spring Security with http basic authentication, there are two services:
You will need to compile this example first:
To run the example, you need to start up the server by typing
To stop the server hit ctrl + c
Then you can use the script in the client directory to send the request and check the response, or use browser to access upper service with the user/password ("jim/jimspassword" with the admin and user role or "rob/robspassword" with user role).
Here is the camel route configuration:
You can find how to configure the camel-servlet with http basic authentication by check the files in WEB-INF