Using "Callable Service", you can access both Post and Get parameters. Here are 2 ways to autheticate using a callable service:
Method 1: Use a separate service for authenticating, and redirect to home page.
- Create a callable service called <Authenticate>
- In this service, check the token and set the logged in user
- In its response, redirect the client to the usual home page
See attached project AuthExample1.zip - to try it using GET, use the URL http://localhost:8080/AuthExample1/Authenticate?User=Test&Token=1234
To test using POST, you need to create a static HTML form that points to this URL.
Method 2: Override the home page serving mechanism so that it performs authentication before serving the application home page:
- Create a callable service called <Welcome>
See attached project AuthExample2.zip To test using GET, use the URL http://localhost:8080/AuthExample2/?User=Test&Token=1234
For best results, use the Firefox browser..