Edit D:\app\Administrator\product\11.2.0\dbhome_1\owb\lib\int\HTTPClient\doc\api\HTTPClient\AuthorizationHandler.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc on Mon May 07 18:52:23 PDT 2001 --> <TITLE> HTTPClient API: Interface AuthorizationHandler </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_top"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="../HTTPClient/AuthorizationPrompter.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="AuthorizationHandler.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> HTTPClient</FONT> <BR> Interface AuthorizationHandler</H2> <DL> <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../HTTPClient/DefaultAuthHandler.html">DefaultAuthHandler</A></DD> </DL> <HR> <DL> <DT>public interface <B>AuthorizationHandler</B></DL> <P> This is the interface that an Authorization handler must implement. You can implement your own auth handler to add support for auth schemes other than the ones handled by the default handler, to use a different UI for soliciting usernames and passwords, or for using an altogether different way of getting the necessary auth info. <P> <DL> <DT><B>Version: </B><DD>0.3-3 06/05/2001</DD> <DT><B>Author: </B><DD>Ronald Tschal?</DD> <DT><B>See Also: </B><DD><A HREF="../HTTPClient/AuthorizationInfo.html#setAuthHandler(HTTPClient.AuthorizationHandler)"><CODE>AuthorizationInfo.setAuthHandler(HTTPClient.AuthorizationHandler)</CODE></A></DL> <HR> <P> <!-- ======== INNER CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Method Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/AuthorizationHandler.html#fixupAuthInfo(HTTPClient.AuthorizationInfo, HTTPClient.RoRequest, HTTPClient.AuthorizationInfo, HTTPClient.RoResponse)">fixupAuthInfo</A></B>(<A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A> info, <A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req, <A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A> challenge, <A HREF="../HTTPClient/RoResponse.html">RoResponse</A> resp)</CODE> <BR> This method is called whenever auth info is chosen from the list of known info in the AuthorizationInfo class to be sent with a request.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/AuthorizationHandler.html#getAuthorization(HTTPClient.AuthorizationInfo, HTTPClient.RoRequest, HTTPClient.RoResponse)">getAuthorization</A></B>(<A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A> challenge, <A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req, <A HREF="../HTTPClient/RoResponse.html">RoResponse</A> resp)</CODE> <BR> This method is called whenever a 401 or 407 response is received and no candidate info is found in the list of known auth info.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/AuthorizationHandler.html#handleAuthHeaders(HTTPClient.Response, HTTPClient.RoRequest, HTTPClient.AuthorizationInfo, HTTPClient.AuthorizationInfo)">handleAuthHeaders</A></B>(<A HREF="../HTTPClient/Response.html">Response</A> resp, <A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req, <A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A> prev, <A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A> prxy)</CODE> <BR> Sometimes even non-401 responses will contain headers pertaining to authorization (such as the "Authentication-Info" header).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/AuthorizationHandler.html#handleAuthTrailers(HTTPClient.Response, HTTPClient.RoRequest, HTTPClient.AuthorizationInfo, HTTPClient.AuthorizationInfo)">handleAuthTrailers</A></B>(<A HREF="../HTTPClient/Response.html">Response</A> resp, <A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req, <A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A> prev, <A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A> prxy)</CODE> <BR> This method is similar to <code>handleAuthHeaders</code> except that it is called if any headers in the trailer were sent.</TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <!-- ========= CONSTRUCTOR DETAIL ======== --> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Method Detail</B></FONT></TD> </TR> </TABLE> <A NAME="getAuthorization(HTTPClient.AuthorizationInfo, HTTPClient.RoRequest, HTTPClient.RoResponse)"><!-- --></A><H3> getAuthorization</H3> <PRE> public <A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A> <B>getAuthorization</B>(<A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A> challenge, <A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req, <A HREF="../HTTPClient/RoResponse.html">RoResponse</A> resp) throws <A HREF="../HTTPClient/AuthSchemeNotImplException.html">AuthSchemeNotImplException</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>This method is called whenever a 401 or 407 response is received and no candidate info is found in the list of known auth info. Usually this method will query the user for the necessary info. <P>If the returned info is not null it will be added to the list of known info. If the info is valid for more than one (host, port, realm, scheme) tuple then this method must add the corresponding auth infos itself. <P>This method must check <var>req.allow_ui</var> and only attempt user interaction if it's <var>true</var>.<DD><DL> <DT><B>Parameters:</B><DD><CODE>challenge</CODE> - the parsed challenge from the server; the host, port, scheme, realm and params are set to the values given by the server in the challenge.<DD><CODE>req</CODE> - the request which provoked this response.<DD><CODE>resp</CODE> - the full response.<DT><B>Returns:</B><DD>the authorization info to use when retrying the request, or null if the request is not to be retried. The necessary info includes the host, port, scheme and realm as given in the <var>challenge</var> parameter, plus either the basic cookie or any necessary params.<DT><B>Throws:</B><DD><A HREF="../HTTPClient/AuthSchemeNotImplException.html">AuthSchemeNotImplException</A> - if the authorization scheme in the challenge cannot be handled.<DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - if an exception occurs while processing the challenge</DL> </DD> </DL> <HR> <A NAME="fixupAuthInfo(HTTPClient.AuthorizationInfo, HTTPClient.RoRequest, HTTPClient.AuthorizationInfo, HTTPClient.RoResponse)"><!-- --></A><H3> fixupAuthInfo</H3> <PRE> public <A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A> <B>fixupAuthInfo</B>(<A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A> info, <A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req, <A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A> challenge, <A HREF="../HTTPClient/RoResponse.html">RoResponse</A> resp) throws <A HREF="../HTTPClient/AuthSchemeNotImplException.html">AuthSchemeNotImplException</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>This method is called whenever auth info is chosen from the list of known info in the AuthorizationInfo class to be sent with a request. This happens when either auth info is being preemptively sent or if a 401 response is retrieved and a matching info is found in the list of known info. The intent of this method is to allow the handler to fix up the info being sent based on the actual request (e.g. in digest authentication the digest-uri, nonce and response-digest usually need to be recalculated).<DD><DL> <DT><B>Parameters:</B><DD><CODE>info</CODE> - the authorization info retrieved from the list of known info.<DD><CODE>req</CODE> - the request this info is targeted for.<DD><CODE>challenge</CODE> - the authorization challenge received from the server if this is in response to a 401, or null if we are preemptively sending the info.<DD><CODE>resp</CODE> - the full 401 response received, or null if we are preemptively sending the info.<DT><B>Returns:</B><DD>the authorization info to be sent with the request, or null if none is to be sent.<DT><B>Throws:</B><DD><A HREF="../HTTPClient/AuthSchemeNotImplException.html">AuthSchemeNotImplException</A> - if the authorization scheme in the info cannot be handled.<DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - if an exception occurs while fixing up the info</DL> </DD> </DL> <HR> <A NAME="handleAuthHeaders(HTTPClient.Response, HTTPClient.RoRequest, HTTPClient.AuthorizationInfo, HTTPClient.AuthorizationInfo)"><!-- --></A><H3> handleAuthHeaders</H3> <PRE> public void <B>handleAuthHeaders</B>(<A HREF="../HTTPClient/Response.html">Response</A> resp, <A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req, <A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A> prev, <A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A> prxy) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Sometimes even non-401 responses will contain headers pertaining to authorization (such as the "Authentication-Info" header). Therefore this method is invoked for each response received, even if it is not a 401 or 407 response. In case of a 401 or 407 response the methods <code>fixupAuthInfo()</code> and <code>getAuthorization()</code> are invoked <em>after</em> this method.<DD><DL> <DT><B>Parameters:</B><DD><CODE>resp</CODE> - the full Response<DD><CODE>req</CODE> - the Request which provoked this response<DD><CODE>prev</CODE> - the previous auth info sent, or null if none was sent<DD><CODE>prxy</CODE> - the previous proxy auth info sent, or null if none was sent<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - if an exception occurs during the reading of the headers.</DL> </DD> </DL> <HR> <A NAME="handleAuthTrailers(HTTPClient.Response, HTTPClient.RoRequest, HTTPClient.AuthorizationInfo, HTTPClient.AuthorizationInfo)"><!-- --></A><H3> handleAuthTrailers</H3> <PRE> public void <B>handleAuthTrailers</B>(<A HREF="../HTTPClient/Response.html">Response</A> resp, <A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req, <A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A> prev, <A HREF="../HTTPClient/AuthorizationInfo.html">AuthorizationInfo</A> prxy) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>This method is similar to <code>handleAuthHeaders</code> except that it is called if any headers in the trailer were sent. This also implies that it is invoked after any <code>fixupAuthInfo()</code> or <code>getAuthorization()</code> invocation.<DD><DL> <DT><B>Parameters:</B><DD><CODE>resp</CODE> - the full Response<DD><CODE>req</CODE> - the Request which provoked this response<DD><CODE>prev</CODE> - the previous auth info sent, or null if none was sent<DD><CODE>prxy</CODE> - the previous proxy auth info sent, or null if none was sent<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - if an exception occurs during the reading of the trailers.<DT><B>See Also: </B><DD><A HREF="../HTTPClient/AuthorizationHandler.html#handleAuthHeaders(HTTPClient.Response, HTTPClient.RoRequest, HTTPClient.AuthorizationInfo, HTTPClient.AuthorizationInfo)"><CODE>handleAuthHeaders(HTTPClient.Response, HTTPClient.RoRequest, HTTPClient.AuthorizationInfo, HTTPClient.AuthorizationInfo)</CODE></A></DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_bottom"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="../HTTPClient/AuthorizationPrompter.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="AuthorizationHandler.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> </BODY> </HTML>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de