82 lines
6.2 KiB
HTML
82 lines
6.2 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="reference" />
|
|
<meta name="DC.Title" content="Authentication classes" />
|
|
<meta name="abstract" content="" />
|
|
<meta name="description" content="" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="servauth" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Authentication classes</title>
|
|
</head>
|
|
<body id="servauth"><a name="servauth"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Authentication classes</h1>
|
|
<div><p></p>
|
|
<div class="section"><p>Two classes in the servlet package perform authentication for
|
|
servlets: <a href="javadoc/com/ibm/as400/util/servlet/AuthenticationServlet.html#NAVBAR_TOP"> AuthenticationServlet</a> and <a href="javadoc/com/ibm/as400/util/servlet/AS400Servlet.html#NAVBAR_TOP"> AS400Servlet</a>.</p>
|
|
</div>
|
|
<div class="section"><p><strong><span class="synph" id="servauth__authenticationservlet"><a name="servauth__authenticationservlet"><!-- --></a><span class="kwd"></span></span>AuthenticationServlet
|
|
class</strong></p>
|
|
</div>
|
|
<div class="section"><p><a href="javadoc/com/ibm/as400/util/servlet/AuthenticationServlet.html#NAVBAR_TOP"> AuthenticationServlet</a> is an HttpServlet
|
|
implementation that performs basic authentication for servlets. Subclasses
|
|
of AuthenticationServlet override one or more of the following methods:</p>
|
|
</div>
|
|
<div class="section"><ul><li>Override the <a href="javadoc/com/ibm/as400/util/servlet/AuthenticationServlet.html#VALIDATEAUTHORITY(JAVA.LANG.STRING, JAVA.LANG.STRING, JAVA.LANG.STRING)"> validateAuthority()</a> method to perform the
|
|
authentication (required)</li>
|
|
<li>Override the <a href="javadoc/com/ibm/as400/util/servlet/AuthenticationServlet.html#BYPASSAUTHENTICATION(JAVAX.SERVLET.HTTP.HTTPSERVLETREQUEST)"> bypassAuthentication()</a> method so that the
|
|
subclass authenticates only certain requests</li>
|
|
<li>Override the <a href="javadoc/com/ibm/as400/util/servlet/AuthenticationServlet.html#POSTVALIDATION(JAVAX.SERVLET.HTTP.HTTPSERVLETREQUEST, COM.IBM.AS400.UTIL.SERVLET.HTTPSERVLETRESPONSE)"> postValidation()</a> method to allow additional
|
|
processing of the request after authentication</li>
|
|
</ul>
|
|
</div>
|
|
<div class="section"><p>The AuthenticationServlet class provides methods that allow you
|
|
to:</p>
|
|
</div>
|
|
<div class="section"><ul><li><a href="javadoc/com/ibm/as400/util/servlet/AuthenticationServlet.html#INIT(COM.IBM.AS400.UTIL.SERVLET.SERVLETCONFIG)"> Initialize</a> the servlet</li>
|
|
<li><a href="javadoc/com/ibm/as400/util/servlet/AuthenticationServlet.html#GETUSER()"> Get the authenticated user ID</a></li>
|
|
<li><a href="javadoc/com/ibm/as400/util/servlet/AuthenticationServlet.html#SETUSER(JAVA.LANG.STRING)"> Set a user ID</a> after bypassing authentication</li>
|
|
<li>Log <a href="javadoc/com/ibm/as400/util/servlet/AuthenticationServlet.html#LOG(JAVA.LANG.EXCEPTION, JAVA.LANG.STRING)"> exceptions</a> and <a href="javadoc/com/ibm/as400/util/servlet/AuthenticationServlet.html#LOG(JAVA.LANG.STRING)"> messages</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="section"><p><strong><span class="synph" id="servauth__as400servlet"><a name="servauth__as400servlet"><!-- --></a><span class="kwd"></span></span>AS400Servlet class</strong></p>
|
|
</div>
|
|
<div class="section"><p>The <a href="javadoc/com/ibm/as400/util/servlet/AS400Servlet.html#NAVBAR_TOP"> AS400Servlet</a> class is an abstract subclass
|
|
of AuthenticationServlet that represents an HTML servlet. You can use a <a href="connectionpool.htm#connectionpool">connection pool</a> to share
|
|
connections and manage the number of connections to the server that a servlet
|
|
user can have.</p>
|
|
</div>
|
|
<div class="section"><p>The AS400Servlet class provides methods that allow you to:</p>
|
|
</div>
|
|
<div class="section"><ul><li><a href="javadoc/com/ibm/as400/util/servlet/AS400Servlet.html#VALIDATEAUTHORITY(JAVA.LANG.STRING, JAVA.LANG.STRING, JAVA.LANG.STRING)"> Validate user authority</a> (by overriding
|
|
the validateAuthority() method of the <a href="#servauth__authenticationservlet"> AuthenticationServlet</a> class)</li>
|
|
<li><a href="javadoc/com/ibm/as400/util/servlet/AS400Servlet.html#GETSYSTEM()"> Connect to a system</a></li>
|
|
<li><a href="javadoc/com/ibm/as400/util/servlet/AS400Servlet.html#GETCONNECTIONPOOL()"> Get</a> and <a href="javadoc/com/ibm/as400/util/servlet/AS400Servlet.html#RETURNSYSTEM(COM.IBM.AS400.ACCESS.AS400)"> return</a> connection pool objects to and from
|
|
the pool</li>
|
|
<li><a href="javadoc/com/ibm/as400/util/servlet/AS400Servlet.html#DESTROY()"> Close</a> a connection pool</li>
|
|
<li><a href="javadoc/com/ibm/as400/util/servlet/AS400Servlet.html#GETDOCUMENTHEAD()"> Get</a> and <a href="javadoc/com/ibm/as400/util/servlet/AS400Servlet.html#SETDOCUMENTHEAD(JAVA.LANG.STRING)"> set</a> the HTML document head tags</li>
|
|
<li><a href="javadoc/com/ibm/as400/util/servlet/AS400Servlet.html#GETDOCUMENTEND()"> Get</a> and <a href="javadoc/com/ibm/as400/util/servlet/AS400Servlet.html#SETDOCUMENTEND(JAVA.LANG.STRING)"> set</a> the HTML document end tags</li>
|
|
</ul>
|
|
</div>
|
|
<div class="section"><p>For more information about servlets in general, see the <a href="reflearn.htm#reflearn__servletslink">reference</a> section.</p>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |