Search DominoPower's 11,441 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
How to use cookies with Notes and the Web (continued)

Authenticating a cookie
A function called CheckCookie is included in the database, inside a script library called WebAuthentication. This script library, or the code inside it, can be copied to any other database requiring Notes/Web session authentication. To authenticate in a Web agent, simply call this function and test the result for true (authentication succeeded) or false (authentication failed). Here's the function:

' In Declarations, declare the script library
Use "WebAuthentication"

' In main code, make authentication

If CheckCookie("MyServerName","NWAuthen.nsf",Cookie$) Then

' successful authentication

Else

' failed authentication

End If

A sample Web agent, called SampleWebAgent, is included which accepts an &X parameter from a Web browser, calls the CheckCookie() function and reports whether authentication succeeded or failed.

In order to run this sample agent from the Web, you must first sign the database with your own signature and set the rights for user anonymous to Reader. This is a simple administrative task. If you don't have a Notes administrator on hand, it can also be accomplished by simply editing the agent (even if the change is only adding a line) and saving it again.

Product availability and resources
To download a sample database to accompany this article, visit http://www.rhizomatics.demon.co.uk/software/nwauthen.zip.

To run SampleWebAgent from a workstation using Web preview, use the URL: http://localhost/NWAuthen.nsf/SampleWebAgent?OpenDatabase&;X=CookieValue

Bulk reprints
Bulk reprints of this article (in quantities of 100 or more) are available for a fee from Reprint Services, a ZATZ business partner. Contact them at reprints@zatz.com or by calling 1-800-217-7874.

DominoPower Contributing Editor Jeffrey R. Burrows has been working with Notes for several years and Domino since its beta cycle and is currently implementing Notes and Domino solutions for the local government in Scotland. His web site experience stretches back to 1992. He still maintains the popular rec.travel guide to Morocco--with a trusty DOS editor. Jeffrey can be reached via email at jey@compuserve.com.


« Previous  ·  1  ·  2  ·  3  ·  4
Other articles you might like
Home > Internet Technologies > Logging and analysis (8 articles)
   Boost your server performance with HTTrack
   Keeping user credentials in a frameset
   Using probes to monitor your Domino servers
Home > Lotus Technologies > Notes (84 articles)
   A walk down Memory Lane with Lotus Notes
   An application for scanning physical mail and distributing it virtually
   Managing Notes deployments with Teamstudio Build Manager
Home > Internet Technologies > HTML and CSS (15 articles)
   Using a reusable code approach to HTML select option lists
   One reader's opinion on HTML mailing
   Keep lookin' good with Cascading Style Sheets
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done. Native to Lotus Domino. The User Experience unseen for Lotus Domino. Do more with less. Really.

See the possibilities Docova unleashes for Lotus Domino.
-- Advertisement --

Teamstudio Edition 25 has shipped
It's finally here! Now that Teamstudio Edition 25 has shipped, listen to our latest Tool Time audio program to find out what's changed. Updates to all your favorite Teamstudio tools will be discussed.

Plus, you'll get an introduction to Teamstudio Undo (formerly known as Teamstudio Snapper).

Tap here to get started!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login