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>
- In its response, use a special server side javascript function _env.getWelcomePageContent() to generate home page content
See attached project AuthExample2.zip To test using GET, use the URL http://localhost:8080/AuthExample2/?User=Test&Token=1234
Youval
To use the full functionality of this web site, JavaScript needs to be turned on.
For best results, use the Firefox browser..
Copyright © 2003-2017 - Tersus Software Ltd., All rights reserved. Terms of Use License Graphic design by EmaraDesign