#  This is version 0.3 of absent
#
#               Copyright (c) 1999 by AT&T.
#  Permission to use, copy, and modify this software without fee is
#  hereby granted, provided that this entire notice is included in all
#  copies of any software which is or includes a copy or modification
#  of this software and in all copies of the supporting documentation
#  for such software.
#
#  SOME PARTS OF ABSENT MAY BE RESTRICTED UNDER UNITED STATES EXPORT
#  REGULATIONS.
#
#  THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
#  IMPLIED WARRANTY.  IN PARTICULAR, NEITHER THE AUTHORS NOR AT&T MAKE
#  ANY REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
#  MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
#  PURPOSE.
#
# Author          : Christian Gilmore
# Created On      : Tue Jun 30 14:45:30 EDT 1998
# Status          : Functional
# 
# NAME
#    ResponsePages.pm
#
# PURPOSE
#    Puts the template responses into variables.
#
###############################################################################
#
# This file consists of the following variables; you'll probably want to
# edit the value of each of them to something appropriate for your site.
# the included versions, while pretty, are pretty specific to AT&T.
#
# $AbsentMessage:  Appears at the top of each page rewritten by absent.
#                  Should include a link to the logout URL to permit
#                  the user to log out, and a link to the jumpurl url
#                  to permit the user to pass arbitrary URLs to absent.
# $StandardFooter: Appears at the bottom of each page generated by absent
# $RegistrationHeader: Top of the page that appears after a user runs the
#                      absent registration CGI script.  This is only
#                      important if you use the sample absent registration
#                      CGI.  See the tools/ directory in the absent
#                      source directory for more information on this.
# $RegistrationFooter: bottom of the same page
# $ChallengePage: The page displayed at the /login=[username] absent URL
# $StartPage: A briefly-displayed redirection page which forces client-pull
#             capable browsers on to their start page after a successful
#             authentication
# $FailedLoginPage: Indicates a user passed on the login URL was not found.
#                   security-conscious sites should make this look like
#                   $ChallengePage in order to prevent login trolling.
# $FailedChallengePage: Informs the user a challenge response was invalid.
# $LogoutPage: Appears when a user clicks the 'logout' button which
#              appears by default in $AbsentMessage.
# $NoKeyPage: Presented when a user's session key has been removed; this
#             may indicate a session has timed out.  Should include
#             a link to the login page to permit the user to reauthenticate
# $BadLengthPage: Indicates a base URL was of a different length than
#                 that indicated in the rewritten URL
# $BadMACPage: sent when a URL failed its message authentication.  May
#              occur when a session has timed out.
# $TimedOutPage: Another page generated when (and only when) sessions time out
# $InvalidCommandPage: the first string sent after https://absent.../ was not
#                      a recognized absent command.
# $UnavailablePage: Sent when pushweb's proxy could not retrieve a page.
#                   probably indicates the remote server is having problems,
#                   or a link is broken.
#
# Some variable substitution occurs on these pages when they pass through
# AbsentProxyRewrite; unfortunately, for reasons of performance and simplicity,
# not all rewrites are performed on all pages.  In generall, all-caps values
# in the HTML snippets below indicate variables which will be substituted
# by the RewriteModule.  Specific variables and where they're appropriate
# include:
# USERID: rewritten in all pages, is the absent login name of the
#         user for whom this page is being generated
# HASH, OTP_NUMBER_STUB, CHALLENGE_STUB: in $ChallengePage only, these
#         are the one-time-password system values for hash function,
#         password number, and challenge.
# PERSONAL_PAGE: On $ChallengePage and $AbsentMessage, the user's personal
#                home page (as stored by the registration CGI).
# STARTPAGE: In $StartPage, the page to which redirection will occur.
#            Note that this isn't always the same as PERSONAL_PAGE.
# UNAVAILABLEPAGE: On $UnavailablePage, the rewritten URL of the page
#                  which could not be retrieved, used to allow the user to
#                  retry the proxy process.
# COMMAND: On $InvalidCommandPage, replaced with the offending command
# NOSUCHSITE: a magic string, used as filler to build URLs which could
#             not otherwise be MACd.  specifically, for 'jumpurl' and
#             'logout' urls, you MUST make the host part NOSUCHSITE,
#             or rewrites will fail.
#
# We're aware this interface is clunky and are working on it.

# Package name
package Response_Pages;


# Required libraries
use strict;
use vars qw(@ISA @EXPORT $VERSION
	    $AbsentMessage $BadLengthPage $BadMACPage $ChallengePage
	    $FailedLoginPage $FailedChallengePage $InvalidCommandPage
	    $LogoutPage $NoKeyPage $RegistrationHeader $RegistrationFooter
	    $StandardFooter $StartPage $TimedOutPage $UnavailablePage);
require Exporter;


# Global variables
@ISA = qw(Exporter);
@EXPORT = qw();
$VERSION = '0.3';


$AbsentMessage = <<"EOF";
<form method="GET" action="http://NOSUCHSITE/jumpurl=USERID">
<table border=0 width=100%>
<tr>
<th colspan=2 align=center>
<font size=+1>
Absent
</font>
</th>
</tr>
<tr>
</td>
<td align=left valign=baseline>
[
  <PP> <a href="PERSONAL_PAGE">My Home</a> | </PP>
  <a href="http://www.research.att.com/projects/absent/">Home</a>
| <a href="http://www.research.att.com/projects/absent/faq.html">FAQ</a>
| <a href="http://NOSUCHSITE/logout=USERID/">Logout</a>
]
</td>
<td align=right valign=top>
<input name="jumpto" type="text" size="25" value="http://">
<input type="submit" value="Jump">
</tr>
</table>
</form>
<hr>
EOF



$StandardFooter = <<"EOF";
<p>
For more information about absent and authentication go to <a
href="http://www.research.att.com/projects/absent/">the absent
home page</a>.
</p>

</body>
</html>
EOF



$RegistrationHeader = <<"EOF";
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Absent - Registration Results</title>
<link rev="made" href="mailto:absent\@research.att.com"> 
</head>

<body bgcolor="#ffffff" leftmargin=0
topmargin=0 marginheight=0 marginwidth=0 link="#339999" vlink="#888888">

<!-- title bar -->
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><a href="http://www.att.com/"><img
src="http://www.research.att.com/banners/ATTlogo.gif" width=124 height=107 border=0
alt="AT&T"></a></td>
<td><a href="http://www.research.att.com/cgi-bin/private/disp_private"><img 
src="http://www.research.att.com/banners/Main.gif" width=476 height=65
alt="AT&T Labs Research" border=0></a><br>
<img src="http://www.research.att.com/banners/Absent.gif" width=476 height=42 alt="Absent - Register"
border=0></td>
</tr>
</table>
<!-- /title bar -->

<table border="0" width="600">

<tr>

<!-- navigation -->
<td valign="top" width="134">
<a href="http://www.research.att.com/"><img src="http://www.research.att.com/toolbars/nav_home_a.gif" width=134
height=37 border=0 alt="Home"></a><br>
<a href="http://www.research.att.com/info/"><img src="http://www.research.att.com/toolbars/nav_people_a.gif"
width=134 height=46 alt="People" border=0></a><br>
<a href="http://www.research.att.com/info/Projects"><img src="http://www.research.att.com/toolbars/nav_projects_a.gif"
width=134 height=42 border="0" alt="Projects"></a><br>
<a href="http://www.research.att.com/areas/"><img src="http://www.research.att.com/toolbars/nav_research_a.gif"
width=134 height=61 alt="Research Areas" border="0"></a><br>
<a href="http://www.research.att.com/resources/"><img src="http://www.research.att.com/toolbars/nav_resources_a.gif"
width=134 height=41 border="0" alt="Resources"></a><br>
<a href="http://www.research.att.com/search.html"><img src="http://www.research.att.com/toolbars/nav_search_a.gif"
width=134 height=36 alt="Search" border="0"></a>
<form action="http://daikon.research.att.com/cgi-bin/search" method="POST">
<div align="right">
<img src="http://www.research.att.com/toolbars/nav_quicksearch.gif" width=114 height=20
alt="Quick Search" border="0"><img src="http://www.research.att.com/icons/spacer.gif" width=18 
height=1 alt="spacer"><br>
<input type="text" size="10" name="query"><img 
src="http://www.research.att.com/icons/spacer.gif" width=18 height=1 alt="spacer">
<input type="hidden" name="collection" value="www">
</div>
</form>
</td>
<!-- /navigation -->

<td valign="top" align="left">

<!-- user content -->


<p align=center>
<strong>
[ <a href="http://www.research.att.com/projects/absent/">Absent Home</a>
| <a href="http://www.research.att.com/projects/absent/register.html">Register</a>
| <a href="http://www.research.att.com/projects/absent/calculators.html">Calculators</a>
| <a href="http://www.research.att.com/projects/absent/faq.html">FAQ</a>
| <a href="http://www.research.att.com/projects/absent/TR-98.17.ps.gz">Download Paper</a>
| <a href="http://www.research.att.com/projects/absent/slides/">Presentations</a>
]
</strong>
</p>


EOF

$RegistrationFooter = <<"EOF";
<p>
<img src="http://www.research.att.com/icons/greyline.gif" width=604 height=20 alt="Grey Line">
</p>

<h5>
<address>
<a href="http://www.research.att.com/info/cgilmore">Christian Gilmore</a> (<a 
href="mailto:cgilmore\@research.att.com">cgilmore\@research.att.com</a>)
<br>
<a href="http://www.research.att.com/info/davek">David Kormann</a> (<a href="mailto:davek\@research.att.com">davek\@research.att.com</a>)
<br>
<a href="http://www.research.att.com/~rubin/">Avi Rubin</a> (<a href="mailto:rubin\@research.att.com">rubin\@research.att.com</a>)
</address>
</h5>

<!-- /user content -->

</td>
</tr>
<tr>
<td></td>
<td align="center">
<!-- bottom navigation-->
<br><br><br>
<font face="arial,helvetica" size="-1">
<a href="http://www.research.att.com/">home</a> | 
<a href="http://www.research.att.com/info/">people</a> |
<a href="http://www.research.att.com/info/Projects">projects</a> |
<a href="http://www.research.att.com/areas/">research areas</a> |
<a href="http://www.research.att.com/resources/">resources</a> |
<a href="http://www.research.att.com/search.html">search</a>
</font>
<!-- /bottom navigation-->
</td>
</tr>
</table>

<p>
<a href="http://www.research.att.com/maps/CopyrightNotice.map"><img ismap
src="http://www.research.att.com/footers/CopyrightNotice.gif" width=484 height=73 border="0" 
alt="Copyright and Privacy Notice"></a>
</p>

</body>
</html>
EOF

$ChallengePage = <<"EOF";
<html>
<head>
<title>Absent - Authentication Form</title>
</head>

<body bgcolor="#FFFFFF"> 

<h1 align=center>
Absent authentication
</h1>

<p>
You, <strong>USERID</strong>, have been recognized as a valid
absent user. To get access to the internal web, you must now
answer the following OPIE challenge. Please enter the 6 word OPIE
one-time password.  You can compute the response with a one-time
password calculator.
</p>

<h2 align=center>
Caution
</h2>

<p> 
Make sure that the challenge number is correct. If the challenge
number is lower than you expected, do not enter the response, but
<a href="mailto:absent\@research.att.com">send mail to the absent
administrators</a>.
</p>

<form method="GET"
action="https://absent.research.att.com/OTP_response=USERID/"> 

<table border=0>
<tr>
<td width=40% align=right>
<strong>Hash Function</strong>: 
</td>
<td align=left>
<samp>HASH</samp>
</td>
</tr>
<tr>
<td width=40% align=right>
<strong>OTP Number</strong>: 
</td>
<td align=left>
<samp>OTP_NUMBER_STUB</samp>
</td>
</tr>
<tr>
<td width=40% align=right>
<strong>OTP Seed</strong>:
</td>
<td align=left>
<samp>CHALLENGE_STUB</samp>
</td>
</tr>
<tr>
<td width=40% align=right>
<strong>Response</strong>:
</td>
<td align=left>
<input name="response" type="text" size="29" maxsize="29"> 
</td>
</tr>
<tr>
<td colspan=2>
&nbsp;
</td>
</tr>
<tr>
<td width=40% align=right>
&nbsp;
</td>
<td>
Please type in the below box the URL of the first page which you 
wish to view or select one of the predefined Start Pages:
</td>
</tr>
<tr>
<td width=40% align=right>
<strong>Start Page</strong>:
</td>
<td align=left>
<input name="startpage" type="text" size="50" value="http://">
</td>
</tr>
<tr>
<td width=40% align=right>
&nbsp;
</td>

<td>
<input name="staticstartpage" type="radio" value="http://www.research.att.com/"> AT&amp;T Labs Research - Home
<br>
<input name="staticstartpage" type="radio" value="http://www.research.att.com/TOC/jumpgate.html"> AT&amp;T Labs Research - Jumpgate
<br>
<input name="staticstartpage" type="radio" value="http://webmail.research.att.com/"> WebMail
<PP>
<br>
<input name="staticstartpage" type="radio" value="PERSONAL_PAGE"> Personal Home Page
</PP>
</td>
</tr>
<tr>
<td widht=40% align=right>
&nbsp;
</td>
<td align=left>
<input type="submit" value="Submit Response">
</td>
</tr>
</table>

</form> 

$StandardFooter
EOF


$StartPage = <<"EOF";
<html>
<head>
<title>Absent - Redirector to Start Page</title>
<meta http-equiv="Refresh" content="0; URL=STARTPAGE">
</head>

<body>

<p>
If your browser supports client-pull, <strong>absent</strong> is
in the process of retrieveing your start page. If nothing happens
within the next few seconds, you can <a href="STARTPAGE">force
the retrieval of your start page</a>.
</p>

</body>
EOF


$FailedLoginPage = <<"EOF";
<html>
<head>
<title>Absent - Authentication Failed</title>
</head>

<body bgcolor="#FFFFFF"> 

<h1 align=center>
Absent authentication failed
</h1>

<p> 
You, <strong>USERID</strong>, have <em>not</em> been recognized
as a valid absent user. This is likely because you have not been
registed with the absent system or you misspelled your userid.
</p>

$StandardFooter
EOF






$FailedChallengePage = <<"EOF";
<html>
<head>
<title>Absent - Authentication Failed</title>
</head>

<body bgcolor="#FFFFFF"> 

<h1 align=center>
Absent authentication failed
</h1>

<p> 
You, <strong>USERID</strong>, did not enter the correct response
to the challenge. <a
href="https://absent.research.att.com/login=USERID">Try
again.</a>
</p>

$StandardFooter
EOF




$LogoutPage = <<"EOF";
<html>
<head>
<title>Absent - Logout</title>
</head>

<body bgcolor="#FFFFFF"> 

<h1 align=center>
Absent logout
</h1>

<p> 
You, <strong>USERID</strong>, have been logged out from the
absent system. If you logged out in error, you must <a
href="https://absent.research.att.com/login=USERID">re-authenticate</a>.
</p>

$StandardFooter
EOF



$NoKeyPage = <<"EOF";
<html>
<head>
<title>Absent - No User Key Found</title>
</head>

<body bgcolor="#FFFFFF"> 

<h1 align=center>
Absent Error
</h1>

<h2 align=center>
No User Key Found
</h2>

<p> 
You, <strong>USERID</strong>, appear to have not validated with
the system or you have not validated recently. Please <a
href="https://absent.research.att.com/login=USERID">authenticate</a>.
</p>

$StandardFooter
EOF


$BadLengthPage = <<"EOF";
<html>
<head>
<title>Absent - Bad URL Length</title>
</head>

<body bgcolor="#FFFFFF"> 

<h1 align=center>
Absent Error
</h1>

<h2 align=center>
Bad URL Length
</h2>

<p> 
The length of the URL you requested does not match the URL length expected.
</p>

$StandardFooter
EOF


$BadMACPage = <<"EOF";
<html>
<head>
<title>Absent - Bad MAC</title>
</head>

<body bgcolor="#FFFFFF"> 

<h1 align=center>
Absent Error
</h1>

<h2 align=center>
Bad MAC
</h2>

<p>
The MAC supplied in the URL is incorrect. It is possible that you
have exceeded the timeout length (you may be attempting to use a MAC
generated from an expired key).
</p>

$StandardFooter
EOF


$TimedOutPage = <<"EOF";
<html>
<head>
<title>Absent - Timed Out</title>
</head>

<body bgcolor="#FFFFFF"> 

<h1 align=center>
Absent Timeout
</h1>

<p>
You have been timed out. Please <a
href="https://absent.research.att.com/login=USERID">re-authenticate</a>
if you wish to continue using the service.
</p>

$StandardFooter
EOF


$InvalidCommandPage = <<"EOF";
<html>
<head>
<title>Absent - Invalid Command</title>
</head>

<body bgcolor="#FFFFFF"> 

<h1 align=center>
Invalid Command
</h1>

<p>
The command you issued, 'COMMAND', is unknown to the absent system.
If you are attempting to log into the system, use the following URL:
</p>

<p>
<menu>
https://absent.research.att.com/login=userid
</menu>
</p>

<p>
where 'userid' is the userid you used to register with absent.
</p>

$StandardFooter
EOF

$UnavailablePage = <<"EOF";
<html>
<head>
<title>Absent - Page/Site Unavailable</title>
</head>

<body bgcolor="#FFFFFF"> 

<h1 align=center>
Unavailable Page/Site
</h1>

<p>
The page you requested was unavailable. This error means that
either the site is unavailable or that the remote web server
returned an error.
</p>

<p>
You may <a href="UNAVAILABLEPAGE">try again</a>.
</p>

$StandardFooter
EOF

1;

__END__

# $Id: Response_Pages.pm,v 1.8 1999/12/16 21:04:17 cgilmore Exp $
# $Log: Response_Pages.pm,v $
# Revision 1.8  1999/12/16 21:04:17  cgilmore
# updated Registration pages
#
# Revision 1.7  1999/12/13 20:09:52  cgilmore
# minor cleanups/alterations for release
#
# Revision 1.4  1999/06/16 20:02:20  cgilmore
# completed module creation
#
# Revision 1.3  1999/06/16 19:17:33  cgilmore
# mid-update to make it a module
#
# Revision 1.2  1999/02/11 21:07:30  cgilmore
# Added jump button and personal home page button to header
# and login page.
#
# Revision 1.1  1999/01/18 21:34:45  cgilmore
# Initial revision
#
