Javadoc updates
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@775317 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a757cafada
commit
d715ace629
|
@ -34,34 +34,24 @@ import org.apache.http.Header;
|
|||
import org.apache.http.HttpRequest;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* This interface represents an abstract challenge-response oriented
|
||||
* authentication scheme.
|
||||
* </p>
|
||||
* <p>
|
||||
* An authentication scheme should be able to support the following
|
||||
* functions:
|
||||
* <ul>
|
||||
* <li>Parse and process the challenge sent by the targer server
|
||||
* <li>Parse and process the challenge sent by the target server
|
||||
* in response to request for a protected resource
|
||||
* <li>Provide its textual designation
|
||||
* <li>Provide its parameters, if available
|
||||
* <li>Provide the realm this authentication scheme is applicable to,
|
||||
* if available
|
||||
* <li>Generate authorization string for the given set of credentials,
|
||||
* request method and URI as specificed in the HTTP request line
|
||||
* in response to the actual authorization challenge
|
||||
* <li>Generate authorization string for the given set of credentials
|
||||
* and the HTTP request in response to the authorization challenge.
|
||||
* </ul>
|
||||
* </p>
|
||||
* <p>
|
||||
* Authentication schemes may ignore method name and URI parameters
|
||||
* if they are not relevant for the given authentication mechanism
|
||||
* </p>
|
||||
* <p>
|
||||
* Authentication schemes may be stateful involving a series of
|
||||
* challenge-response exchanges
|
||||
* </p>
|
||||
*
|
||||
* challenge-response exchanges.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
|
|
|
@ -34,12 +34,19 @@ package org.apache.http.auth;
|
|||
import org.apache.http.params.HttpParams;
|
||||
|
||||
/**
|
||||
*
|
||||
* Factory for {@link AuthScheme} implementations.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
public interface AuthSchemeFactory {
|
||||
|
||||
/**
|
||||
* Creates an instance of {@link AuthScheme} using given HTTP parameters.
|
||||
*
|
||||
* @param params HTTP parameters.
|
||||
*
|
||||
* @return auth scheme.
|
||||
*/
|
||||
AuthScheme newInstance(HttpParams params);
|
||||
|
||||
}
|
||||
|
|
|
@ -43,11 +43,8 @@ import org.apache.http.params.HttpParams;
|
|||
|
||||
/**
|
||||
* Authentication scheme registry that can be used to obtain the corresponding
|
||||
* authentication scheme implementation for a given type of authorization challenge.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @version $Revision$
|
||||
* authentication scheme implementation for a given type of authorization challenge.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
|
|
|
@ -33,10 +33,9 @@ package org.apache.http.auth;
|
|||
import java.security.Principal;
|
||||
|
||||
/**
|
||||
* User name and password based authentication credentials.
|
||||
*
|
||||
*
|
||||
* @version $Revision$ $Date$
|
||||
* This interface represents a set of credentials consisting of a security
|
||||
* principal and a secret (password) that can be used to establish user
|
||||
* identity
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
|
|
|
@ -37,10 +37,11 @@ import net.jcip.annotations.Immutable;
|
|||
|
||||
import org.apache.http.util.LangUtils;
|
||||
|
||||
/** {@link Credentials} specific to the Windows platform.
|
||||
*
|
||||
/**
|
||||
* {@link Credentials} implementation for Microsoft Windows platforms that includes
|
||||
* Windows specific attributes such as name of the domain the user belongs to.
|
||||
*
|
||||
* @since 2.0
|
||||
* @since 4.0
|
||||
*/
|
||||
@Immutable
|
||||
public class NTCredentials implements Credentials {
|
||||
|
|
|
@ -37,8 +37,8 @@ import net.jcip.annotations.Immutable;
|
|||
|
||||
import org.apache.http.util.LangUtils;
|
||||
|
||||
/** NT (MS Windows specific) user principal used for HTTP authentication
|
||||
*
|
||||
/**
|
||||
* Microsoft Windows specific user principal implementation.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
|
|
|
@ -37,11 +37,8 @@ import net.jcip.annotations.Immutable;
|
|||
import org.apache.http.util.LangUtils;
|
||||
|
||||
/**
|
||||
* Username and password {@link Credentials}
|
||||
*
|
||||
*
|
||||
* @version $Revision$ $Date$
|
||||
*
|
||||
* Simple {@link Credentials} implementation based on a user name / password
|
||||
* pair.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
|
|
|
@ -34,8 +34,6 @@
|
|||
-->
|
||||
</head>
|
||||
<body>
|
||||
The API for client-side HTTP authentication against a server,
|
||||
commonly referred to as <i>HttpAuth</i>.
|
||||
|
||||
The API for client-side HTTP authentication against a server.
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -32,9 +32,7 @@
|
|||
package org.apache.http.auth.params;
|
||||
|
||||
/**
|
||||
* Parameter names for HttpAuth.
|
||||
*
|
||||
* @version $Revision$
|
||||
* Parameter names for HTTP authentication classes.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
|
@ -45,11 +43,6 @@ public interface AuthPNames {
|
|||
* {@link org.apache.http.auth.Credentials}.
|
||||
* <p>
|
||||
* This parameter expects a value of type {@link String}.
|
||||
* If not defined, then
|
||||
* {@link org.apache.http.params.CoreProtocolPNames#HTTP_ELEMENT_CHARSET
|
||||
* HttpProtocolParams.HTTP_ELEMENT_CHARSET}
|
||||
* should be used.
|
||||
* </p>
|
||||
*/
|
||||
public static final String CREDENTIAL_CHARSET = "http.auth.credential-charset";
|
||||
|
||||
|
|
|
@ -35,6 +35,9 @@ import org.apache.http.params.HttpAbstractParamBean;
|
|||
import org.apache.http.params.HttpParams;
|
||||
|
||||
/**
|
||||
* This is a Java Bean class that can be used to wrap an instance of
|
||||
* {@link HttpParams} and manipulate HTTP authentication parameters
|
||||
* using Java Beans conventions.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
|
|
|
@ -37,11 +37,8 @@ import org.apache.http.params.HttpParams;
|
|||
import org.apache.http.protocol.HTTP;
|
||||
|
||||
/**
|
||||
* This class implements an adaptor around the {@link HttpParams} interface
|
||||
* to simplify manipulation of the HTTP authentication specific parameters.
|
||||
*
|
||||
*
|
||||
* @version $Revision$
|
||||
* An adaptor for manipulating HTTP authentication parameters
|
||||
* in {@link HttpParams}.
|
||||
*
|
||||
* @since 4.0
|
||||
*
|
||||
|
@ -55,15 +52,11 @@ public final class AuthParams {
|
|||
}
|
||||
|
||||
/**
|
||||
* Obtains the charset for encoding
|
||||
* {@link org.apache.http.auth.Credentials}.
|
||||
* If not configured,
|
||||
* {@link HTTP#DEFAULT_PROTOCOL_CHARSET HTTP.DEFAULT_PROTOCOL_CHARSET}
|
||||
* is used instead.
|
||||
* Obtains the charset for encoding
|
||||
* {@link org.apache.http.auth.Credentials}.If not configured,
|
||||
* {@link HTTP#DEFAULT_PROTOCOL_CHARSET}is used instead.
|
||||
*
|
||||
* @return The charset
|
||||
*
|
||||
* @see AuthPNames#CREDENTIAL_CHARSET
|
||||
*/
|
||||
public static String getCredentialCharset(final HttpParams params) {
|
||||
if (params == null) {
|
||||
|
@ -71,8 +64,6 @@ public final class AuthParams {
|
|||
}
|
||||
String charset = (String) params.getParameter
|
||||
(AuthPNames.CREDENTIAL_CHARSET);
|
||||
//@@@ TODO: inconsistent with JavaDoc in AuthPNames,
|
||||
//@@@ TODO: check HTTP_ELEMENT_CHARSET first, or fix JavaDocs
|
||||
if (charset == null) {
|
||||
charset = HTTP.DEFAULT_PROTOCOL_CHARSET;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
-->
|
||||
</head>
|
||||
<body>
|
||||
Parameters for configuring <i>HttpAuth</i>.
|
||||
Parameters for configuring HTTP authentication classes.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -35,7 +35,7 @@ import net.jcip.annotations.Immutable;
|
|||
import org.apache.http.params.HttpParams;
|
||||
|
||||
/**
|
||||
* An adaptor for accessing HTTP client parameters in {@link HttpParams}.
|
||||
* An adaptor for manipulating HTTP client parameters in {@link HttpParams}.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
|
|
|
@ -36,9 +36,8 @@ import org.apache.http.conn.routing.HttpRoute;
|
|||
import org.apache.http.params.HttpParams;
|
||||
|
||||
/**
|
||||
* This class represents a collection of HTTP protocol parameters applicable
|
||||
* to client-side
|
||||
* {@link org.apache.http.conn.ClientConnectionManager connection managers}.
|
||||
* An adaptor for manipulating HTTP connection management
|
||||
* parameters in {@link HttpParams}.
|
||||
*
|
||||
* @since 4.0
|
||||
*
|
||||
|
|
|
@ -39,8 +39,8 @@ import org.apache.http.params.HttpParams;
|
|||
import org.apache.http.conn.routing.HttpRoute;
|
||||
|
||||
/**
|
||||
* An adaptor for accessing route related parameters in {@link HttpParams}.
|
||||
* See {@link ConnRoutePNames} for parameter name definitions.
|
||||
* An adaptor for manipulating HTTP routing parameters
|
||||
* in {@link HttpParams}.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
-->
|
||||
</head>
|
||||
<body>
|
||||
Parameters for configuring HTTP state management
|
||||
related classes.
|
||||
Parameters for configuring HTTP state management classes.
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -45,14 +45,16 @@ import org.apache.http.util.CharArrayBuffer;
|
|||
import org.apache.http.util.EncodingUtils;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Basic authentication scheme as defined in RFC 2617.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* The following parameters can be used to customize the behavior of this
|
||||
* class:
|
||||
* <ul>
|
||||
* <li>{@link org.apache.http.auth.params.AuthPNames#CREDENTIAL_CHARSET}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
|
||||
@NotThreadSafe
|
||||
public class BasicScheme extends RFC2617Scheme {
|
||||
|
||||
|
@ -60,7 +62,7 @@ public class BasicScheme extends RFC2617Scheme {
|
|||
private boolean complete;
|
||||
|
||||
/**
|
||||
* Default constructor for the basic authetication scheme.
|
||||
* Default constructor for the basic authentication scheme.
|
||||
*/
|
||||
public BasicScheme() {
|
||||
super();
|
||||
|
@ -113,10 +115,10 @@ public class BasicScheme extends RFC2617Scheme {
|
|||
/**
|
||||
* Produces basic authorization header for the given set of {@link Credentials}.
|
||||
*
|
||||
* @param credentials The set of credentials to be used for athentication
|
||||
* @param credentials The set of credentials to be used for authentication
|
||||
* @param request The request being authenticated
|
||||
* @throws org.apache.http.auth.InvalidCredentialsException if authentication credentials
|
||||
* are not valid or not applicable for this authentication scheme
|
||||
* @throws InvalidCredentialsException if authentication credentials are not
|
||||
* valid or not applicable for this authentication scheme
|
||||
* @throws AuthenticationException if authorization string cannot
|
||||
* be generated due to an authentication failure
|
||||
*
|
||||
|
|
|
@ -38,7 +38,8 @@ import org.apache.http.auth.AuthSchemeFactory;
|
|||
import org.apache.http.params.HttpParams;
|
||||
|
||||
/**
|
||||
*
|
||||
* {@link AuthSchemeFactory} implementation that creates and initializes
|
||||
* {@link BasicScheme} instances.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
|
|
|
@ -51,24 +51,27 @@ import org.apache.http.util.CharArrayBuffer;
|
|||
import org.apache.http.util.EncodingUtils;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Digest authentication scheme as defined in RFC 2617.
|
||||
* Both MD5 (default) and MD5-sess are supported.
|
||||
* Currently only qop=auth or no qop is supported. qop=auth-int
|
||||
* is unsupported. If auth and auth-int are provided, auth is
|
||||
* used.
|
||||
* </p>
|
||||
* <p>
|
||||
* Credential charset is configured via the
|
||||
* {@link org.apache.http.auth.params.AuthPNames#CREDENTIAL_CHARSET
|
||||
* credential charset} parameter.
|
||||
* {@link org.apache.http.auth.params.AuthPNames#CREDENTIAL_CHARSET}
|
||||
* parameter of the HTTP request.
|
||||
* <p>
|
||||
* Since the digest username is included as clear text in the generated
|
||||
* Authentication header, the charset of the username must be compatible
|
||||
* with the
|
||||
* {@link org.apache.http.params.CoreProtocolPNames#HTTP_ELEMENT_CHARSET
|
||||
* http element charset}.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* The following parameters can be used to customize the behavior of this
|
||||
* class:
|
||||
* <ul>
|
||||
* <li>{@link org.apache.http.auth.params.AuthPNames#CREDENTIAL_CHARSET}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
|
|
|
@ -38,7 +38,8 @@ import org.apache.http.auth.AuthSchemeFactory;
|
|||
import org.apache.http.params.HttpParams;
|
||||
|
||||
/**
|
||||
*
|
||||
* {@link AuthSchemeFactory} implementation that creates and initializes
|
||||
* {@link DigestScheme} instances.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
|
|
|
@ -34,9 +34,6 @@ package org.apache.http.impl.auth;
|
|||
* Abstract NTLM authentication engine. The engine can be used to
|
||||
* generate Type1 messages and Type3 messages in response to a
|
||||
* Type2 challenge.
|
||||
* <p/>
|
||||
* For details see <a href="http://davenport.sourceforge.net/ntlm.html">this resource</a>
|
||||
*
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
|
|
|
@ -45,7 +45,15 @@ import org.apache.http.message.BufferedHeader;
|
|||
import org.apache.http.util.CharArrayBuffer;
|
||||
|
||||
/**
|
||||
*
|
||||
* NTLM is a proprietary authentication scheme developed by Microsoft
|
||||
* and optimized for Windows platforms.
|
||||
* <p>
|
||||
* Please note that the NTLM scheme requires an external
|
||||
* {@link NTLMEngine} implementation to function!
|
||||
* For details please refer to
|
||||
* <a href="http://hc.apache.org/httpcomponents-client/ntlm.html">
|
||||
* this document</a>.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@NotThreadSafe
|
||||
|
|
|
@ -43,10 +43,9 @@ import org.apache.http.util.CharArrayBuffer;
|
|||
|
||||
/**
|
||||
* Abstract authentication scheme class that lays foundation for all
|
||||
* RFC 2617 compliant authetication schemes and provides capabilities common
|
||||
* RFC 2617 compliant authentication schemes and provides capabilities common
|
||||
* to all authentication schemes defined in RFC 2617.
|
||||
*
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
public abstract class RFC2617Scheme extends AuthSchemeBase {
|
||||
|
@ -57,7 +56,7 @@ public abstract class RFC2617Scheme extends AuthSchemeBase {
|
|||
private Map<String, String> params;
|
||||
|
||||
/**
|
||||
* Default constructor for RFC2617 compliant authetication schemes.
|
||||
* Default constructor for RFC2617 compliant authentication schemes.
|
||||
*/
|
||||
public RFC2617Scheme() {
|
||||
super();
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
<html>
|
||||
<head>
|
||||
<!--
|
||||
/*
|
||||
* $HeadURL:$
|
||||
* $Revision:$
|
||||
* $Date:$
|
||||
*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
-->
|
||||
</head>
|
||||
<body>
|
||||
Default implementations for interfaces in
|
||||
{@link org.apache.http.auth org.apache.http.auth}.
|
||||
</body>
|
||||
</html>
|
|
@ -114,9 +114,15 @@ import org.apache.http.protocol.HttpRequestExecutor;
|
|||
* <li>{@link org.apache.http.params.CoreConnectionPNames#TCP_NODELAY}</li>
|
||||
* <li>{@link org.apache.http.params.CoreConnectionPNames#CONNECTION_TIMEOUT}</li>
|
||||
* <li>{@link org.apache.http.params.CoreConnectionPNames#STALE_CONNECTION_CHECK}</li>
|
||||
* <li>{@link org.apache.http.conn.params.ConnRoutePNames#FORCED_ROUTE}</li>
|
||||
* <li>{@link org.apache.http.conn.params.ConnRoutePNames#LOCAL_ADDRESS}</li>
|
||||
* <li>{@link org.apache.http.conn.params.ConnRoutePNames#DEFAULT_PROXY}</li>
|
||||
* <li>{@link org.apache.http.conn.params.ConnManagerPNames#TIMEOUT}</li>
|
||||
* <li>{@link org.apache.http.conn.params.ConnManagerPNames#MAX_CONNECTIONS_PER_ROUTE}</li>
|
||||
* <li>{@link org.apache.http.conn.params.ConnManagerPNames#MAX_TOTAL_CONNECTIONS}</li>
|
||||
* <li>{@link org.apache.http.cookie.params.CookieSpecPNames#DATE_PATTERNS}</li>
|
||||
* <li>{@link org.apache.http.cookie.params.CookieSpecPNames#SINGLE_COOKIE_HEADER}</li>
|
||||
* <li>{@link org.apache.http.auth.params.AuthPNames#CREDENTIAL_CHARSET}</li>
|
||||
* <li>{@link org.apache.http.client.params.ClientPNames#COOKIE_POLICY}</li>
|
||||
* <li>{@link org.apache.http.client.params.ClientPNames#VIRTUAL_HOST}</li>
|
||||
* <li>{@link org.apache.http.client.params.ClientPNames#MAX_REDIRECTS}</li>
|
||||
|
|
Loading…
Reference in New Issue