1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
5
<!-- Generated by javadoc on Sun Oct 10 17:41:05 EDT 2004 -->
7
HttpClient 2.0.2 API: Interface AuthScheme
9
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
11
<BODY BGCOLOR="white">
13
<!-- ========== START OF NAVBAR ========== -->
14
<A NAME="navbar_top"><!-- --></A>
15
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
17
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
18
<A NAME="navbar_top_firstrow"><!-- --></A>
19
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
20
<TR ALIGN="center" VALIGN="top">
21
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
22
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
23
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
24
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AuthScheme.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
25
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
26
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
27
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
28
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
32
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
38
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
39
PREV CLASS
40
NEXT CLASS</FONT></TD>
41
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
42
<A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
43
<A HREF="AuthScheme.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
46
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
47
SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
48
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
49
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
52
<!-- =========== END OF NAVBAR =========== -->
55
<!-- ======== START OF CLASS DATA ======== -->
58
org.apache.commons.httpclient.auth</FONT>
60
Interface AuthScheme</H2>
62
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../../org/apache/commons/httpclient/auth/AuthSchemeBase.html">AuthSchemeBase</A></DD>
66
<DT>public interface <B>AuthScheme</B></DL>
70
This interface represents an abstract authentication scheme.
73
An authentication scheme should be able to support the following
76
<li>Provide its textual designation
77
<li>Provide its parameters, if available
78
<li>Provide the realm this authentication scheme is applicable to,
80
<li>Generate authorization string for the given set of credentials,
81
request method and URI as specificed in the HTTP request line
85
Authentication schemes may ignore method name and URI parameters
86
if they are not relevant for the given authentication mechanism
90
<DT><B>Since: </B><DD>2.0beta1</DD>
91
<DT><B>Author: </B><DD><a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>, <a href="mailto:adrian@ephox.com">Adrian Sutton</a></DD>
96
<!-- ======== INNER CLASS SUMMARY ======== -->
99
<!-- =========== FIELD SUMMARY =========== -->
102
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
105
<!-- ========== METHOD SUMMARY =========== -->
107
<A NAME="method_summary"><!-- --></A>
108
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
109
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
110
<TD COLSPAN=2><FONT SIZE="+2">
111
<B>Method Summary</B></FONT></TD>
113
<TR BGCOLOR="white" CLASS="TableRowColor">
114
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
115
<CODE> <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
116
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/auth/AuthScheme.html#authenticate(org.apache.commons.httpclient.Credentials, java.lang.String, java.lang.String)">authenticate</A></B>(<A HREF="../../../../../org/apache/commons/httpclient/Credentials.html">Credentials</A> credentials,
117
<A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A> method,
118
<A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A> uri)</CODE>
121
Produces an authorization string for the given set of <A HREF="../../../../../org/apache/commons/httpclient/Credentials.html"><CODE>Credentials</CODE></A>,
122
method name and URI using the given authentication scheme.</TD>
124
<TR BGCOLOR="white" CLASS="TableRowColor">
125
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
126
<CODE> <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
127
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/auth/AuthScheme.html#getID()">getID</A></B>()</CODE>
130
Returns a String identifying the authentication challenge.</TD>
132
<TR BGCOLOR="white" CLASS="TableRowColor">
133
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
134
<CODE> <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
135
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/auth/AuthScheme.html#getParameter(java.lang.String)">getParameter</A></B>(<A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A> name)</CODE>
138
Returns authentication parameter with the given name, if available.</TD>
140
<TR BGCOLOR="white" CLASS="TableRowColor">
141
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
142
<CODE> <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
143
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/auth/AuthScheme.html#getRealm()">getRealm</A></B>()</CODE>
146
Returns authentication realm.</TD>
148
<TR BGCOLOR="white" CLASS="TableRowColor">
149
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
150
<CODE> <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
151
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/auth/AuthScheme.html#getSchemeName()">getSchemeName</A></B>()</CODE>
154
Returns textual designation of the given authentication scheme.</TD>
160
<!-- ============ FIELD DETAIL =========== -->
163
<!-- ========= CONSTRUCTOR DETAIL ======== -->
166
<!-- ============ METHOD DETAIL ========== -->
168
<A NAME="method_detail"><!-- --></A>
169
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
170
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
171
<TD COLSPAN=1><FONT SIZE="+2">
172
<B>Method Detail</B></FONT></TD>
176
<A NAME="getSchemeName()"><!-- --></A><H3>
179
public <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A> <B>getSchemeName</B>()</PRE>
181
<DD>Returns textual designation of the given authentication scheme.<DD><DL>
182
<DT><B>Returns:</B><DD>the name of the given authentication scheme</DL>
187
<A NAME="getParameter(java.lang.String)"><!-- --></A><H3>
190
public <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A> <B>getParameter</B>(<A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A> name)</PRE>
192
<DD>Returns authentication parameter with the given name, if available.<DD><DL>
193
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the parameter to be returned<DT><B>Returns:</B><DD>the parameter with the given name</DL>
198
<A NAME="getRealm()"><!-- --></A><H3>
201
public <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A> <B>getRealm</B>()</PRE>
203
<DD>Returns authentication realm. If the concept of an authentication
204
realm is not applicable to the given authentication scheme, returns
205
<code>null</code>.<DD><DL>
206
<DT><B>Returns:</B><DD>the authentication realm</DL>
211
<A NAME="getID()"><!-- --></A><H3>
214
public <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A> <B>getID</B>()</PRE>
216
<DD>Returns a String identifying the authentication challenge. This is
217
used, in combination with the host and port to determine if
218
authorization has already been attempted or not. Schemes which
219
require multiple requests to complete the authentication should
220
return a different value for each stage in the request.
222
<p>Additionally, the ID should take into account any changes to the
223
authentication challenge and return a different value when appropriate.
224
For example when the realm changes in basic authentication it should be
225
considered a different authentication attempt and a different value should
226
be returned.</p><DD><DL>
227
<DT><B>Returns:</B><DD>String a String identifying the authentication challenge. The
228
returned value may be null.</DL>
233
<A NAME="authenticate(org.apache.commons.httpclient.Credentials, java.lang.String, java.lang.String)"><!-- --></A><H3>
236
public <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A> <B>authenticate</B>(<A HREF="../../../../../org/apache/commons/httpclient/Credentials.html">Credentials</A> credentials,
237
<A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A> method,
238
<A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A> uri)
239
throws <A HREF="../../../../../org/apache/commons/httpclient/auth/AuthenticationException.html">AuthenticationException</A></PRE>
241
<DD>Produces an authorization string for the given set of <A HREF="../../../../../org/apache/commons/httpclient/Credentials.html"><CODE>Credentials</CODE></A>,
242
method name and URI using the given authentication scheme.<DD><DL>
243
<DT><B>Parameters:</B><DD><CODE>credentials</CODE> - The set of credentials to be used for athentication<DD><CODE>method</CODE> - The name of the method that requires authorization.
244
This parameter may be ignored, if it is irrelevant
245
or not applicable to the given authentication scheme<DD><CODE>uri</CODE> - The URI for which authorization is needed.
246
This parameter may be ignored, if it is irrelevant or not
247
applicable to the given authentication scheme<DT><B>Returns:</B><DD>the authorization string<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/commons/httpclient/auth/AuthenticationException.html">AuthenticationException</A></CODE> - if authorization string cannot
248
be generated due to an authentication failure<DT><B>See Also: </B><DD><A HREF="../../../../../org/apache/commons/httpclient/HttpMethod.html#getName()"><CODE>HttpMethod.getName()</CODE></A>,
249
<A HREF="../../../../../org/apache/commons/httpclient/HttpMethod.html#getPath()"><CODE>HttpMethod.getPath()</CODE></A></DL>
252
<!-- ========= END OF CLASS DATA ========= -->
255
<!-- ========== START OF NAVBAR ========== -->
256
<A NAME="navbar_bottom"><!-- --></A>
257
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
259
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
260
<A NAME="navbar_bottom_firstrow"><!-- --></A>
261
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
262
<TR ALIGN="center" VALIGN="top">
263
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
264
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
265
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
266
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AuthScheme.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
267
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
268
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
269
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
270
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
274
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
280
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
281
PREV CLASS
282
NEXT CLASS</FONT></TD>
283
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
284
<A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
285
<A HREF="AuthScheme.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
288
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
289
SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
290
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
291
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
294
<!-- =========== END OF NAVBAR =========== -->
297
Copyright © 2001-2004 Apache Software Foundation. All Rights Reserved.