Prompting for AuthenticationThis code snippet describes how to prompt for HTTP Basic Authentication using a Java Servlet. The extension sends back a '401 Authenticate' response to the client if the client has not provided authentication credentials, or if the client's credentials are not valid. This response will generally cause a client's browser to display a dialog box requesting a user's credentials:
The code
You would call this Java Extension from a request rule:
If the authentication was not successful, the call to If the authentication was successful, the Running the codeSee the Overview article, which describes how to create a Java source file from this code snippet. The Watermarking article describes how to compile and deploy an extension using an IDE like Eclipse, and the Java Develoment Guide contains a complete reference. The Active Directory article uses this code as the basis for authenticating users against an Active Directory server. It also describes how to cache authentication results in TrafficScript to improve performance and reduce the load on the authentication server. Comments:This public messageboard is not a forum for technical support. To report technical support problems, please contact our dedicated Support team using the instructions at the bottom of this page.
Comment from:
Jeff Jones [Visitor]
· http://www.yottaserve.com
I would like to be able to somehow tie this functionality up with a users stored website login credentials.
In the example above on this page (401 Authenticate) - is the username and password hard coded? If I have an intranet that holds authentication details for each user in a mysql database - would it be possible to tie up the users website login with that of the authentication screen presented by the ZXTM? If there are any examples of how to do this - I would be very grateful. Cheers, Jeff |
Recently...
Other Resources
|






