[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpcomponents-commits
Subject:    svn commit: r487318 - in
From:       olegk () apache ! org
Date:       2006-12-14 19:42:41
Message-ID: 20061214194241.B6DAC1A981D () eris ! apache ! org
[Download RAW message or body]

Author: olegk
Date: Thu Dec 14 11:42:40 2006
New Revision: 487318

URL: http://svn.apache.org/viewvc?view=rev&rev=487318
Log:
Ported AuthScheme and related classes from HttpClient 3.x to the new API

Added:
    jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/AuthScheme.java
                
      - copied, changed from r487203, \
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/AuthScheme.java
  jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/AuthenticationException.java
                
      - copied, changed from r487203, \
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/AuthenticationException.java
  jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/Credentials.java
                
      - copied, changed from r487204, \
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/Credentials.java
  jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/InvalidCredentialsException.java
                
      - copied, changed from r487204, \
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/InvalidCredentialsException.java
  jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/MalformedChallengeException.java
                
      - copied, changed from r487204, \
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/MalformedChallengeException.java


Copied: jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/AuthScheme.java \
(from r487203, jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/AuthScheme.java)
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/src/java/org \
/apache/http/auth/AuthScheme.java?view=diff&rev=487318&p1=jakarta/commons/proper/httpc \
lient/trunk/src/java/org/apache/commons/httpclient/auth/AuthScheme.java&r1=487203&p2=j \
akarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/AuthScheme.java&r2=487318
 ==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/AuthScheme.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/AuthScheme.java \
Thu Dec 14 11:42:40 2006 @@ -1,5 +1,5 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/auth/AuthScheme.java,v \
1.12 2004/05/13 04:02:00 mbecke Exp $ + * $HeadURL$
  * $Revision$
  * $Date$
  *
@@ -28,10 +28,10 @@
  *
  */
 
-package org.apache.commons.httpclient.auth;
+package org.apache.http.auth;
 
-import org.apache.commons.httpclient.Credentials;
-import org.apache.commons.httpclient.HttpMethod;
+import org.apache.http.Header;
+import org.apache.http.HttpMessage;
 
 /**
  * <p>
@@ -79,7 +79,7 @@
      * 
      * @since 3.0
      */
-    void processChallenge(final String challenge) throws \
MalformedChallengeException; +    void processChallenge(final Header header) throws \
MalformedChallengeException;  
     /**
      * Returns textual designation of the given authentication scheme.
@@ -107,26 +107,6 @@
     String getRealm();
     
     /**
-     * Returns a String identifying the authentication challenge.  This is
-     * used, in combination with the host and port to determine if
-     * authorization has already been attempted or not.  Schemes which
-     * require multiple requests to complete the authentication should
-     * return a different value for each stage in the request.
-     * 
-     * <p>Additionally, the ID should take into account any changes to the
-     * authentication challenge and return a different value when appropriate.
-     * For example when the realm changes in basic authentication it should be
-     * considered a different authentication attempt and a different value should
-     * be returned.</p>
-     * 
-     * @return String a String identifying the authentication challenge.  The
-     * returned value may be null.
-     * 
-     * @deprecated no longer used
-     */
-    String getID();
-
-    /**
      * Tests if the authentication scheme is provides authorization on a per
      * connection basis instead of usual per request basis
      * 
@@ -149,30 +129,6 @@
      * @since 3.0
      */
     boolean isComplete();    
-    /**
-     * @deprecated Use {@link #authenticate(Credentials, HttpMethod)}
-     * 
-     * Produces an authorization string for the given set of {@link Credentials},
-     * method name and URI using the given authentication scheme in response to 
-     * the actual authorization challenge.
-     * 
-     * @param credentials The set of credentials to be used for athentication
-     * @param method The name of the method that requires authorization. 
-     *   This parameter may be ignored, if it is irrelevant 
-     *   or not applicable to the given authentication scheme
-     * @param uri The URI for which authorization is needed. 
-     *   This parameter may be ignored, if it is irrelevant or not 
-     *   applicable to the given authentication scheme
-     * @throws AuthenticationException if authorization string cannot 
-     *   be generated due to an authentication failure
-     * 
-     * @return the authorization string
-     * 
-     * @see org.apache.commons.httpclient.HttpMethod#getName()
-     * @see org.apache.commons.httpclient.HttpMethod#getPath()
-     */
-    String authenticate(Credentials credentials, String method, String uri) 
-      throws AuthenticationException;
 
     /**
      * Produces an authorization string for the given set of {@link Credentials}.
@@ -186,6 +142,6 @@
      * 
      * @since 3.0
      */
-    String authenticate(Credentials credentials, HttpMethod method) throws \
AuthenticationException; +    Header authenticate(Credentials credentials, \
HttpMessage message) throws AuthenticationException;  
 }

Copied: jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/AuthenticationException.java \
(from r487203, jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/AuthenticationException.java)
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/src/java/org \
/apache/http/auth/AuthenticationException.java?view=diff&rev=487318&p1=jakarta/commons \
/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/AuthenticationExc \
eption.java&r1=487203&p2=jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/AuthenticationException.java&r2=487318
 ==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/AuthenticationException.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/AuthenticationException.java \
Thu Dec 14 11:42:40 2006 @@ -1,5 +1,5 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-common \
s//httpclient/src/java/org/apache/commons/httpclient/auth/AuthenticationException.java,v \
1.6 2004/05/13 04:02:00 mbecke Exp $ + * $HeadURL$
  * $Revision$
  * $Date$
  *
@@ -28,18 +28,20 @@
  *
  */
 
-package org.apache.commons.httpclient.auth;
+package org.apache.http.auth;
 
-import org.apache.commons.httpclient.ProtocolException;
+import org.apache.http.ProtocolException;
 
 /**
  * Signals a failure in authentication process
  *
- * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  * 
  * @since 2.0
  */
 public class AuthenticationException extends ProtocolException {
+
+    private static final long serialVersionUID = -6794031905674764776L;
 
     /**
      * Creates a new AuthenticationException with a <tt>null</tt> detail message. 

Copied: jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/Credentials.java \
(from r487204, jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/Credentials.java)
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/src/java/org \
/apache/http/auth/Credentials.java?view=diff&rev=487318&p1=jakarta/commons/proper/http \
client/trunk/src/java/org/apache/commons/httpclient/Credentials.java&r1=487204&p2=jaka \
rta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/Credentials.java&r2=487318
 ==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/Credentials.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/Credentials.java \
Thu Dec 14 11:42:40 2006 @@ -1,5 +1,5 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/Credentials.java,v \
1.9 2004/04/18 23:51:34 jsdever Exp $ + * $HeadURL$
  * $Revision$
  * $Date$
  *
@@ -28,7 +28,7 @@
  *
  */
 
-package org.apache.commons.httpclient;
+package org.apache.http.auth;
 
 /**
  * <p>Authentication credentials.</p>

Copied: jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/InvalidCredentialsException.java \
(from r487204, jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/InvalidCredentialsException.java)
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/src/java/org \
/apache/http/auth/InvalidCredentialsException.java?view=diff&rev=487318&p1=jakarta/com \
mons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/InvalidCreden \
tialsException.java&r1=487204&p2=jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/InvalidCredentialsException.java&r2=487318
 ==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/InvalidCredentialsException.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/InvalidCredentialsException.java \
Thu Dec 14 11:42:40 2006 @@ -1,5 +1,5 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-common \
s//httpclient/src/java/org/apache/commons/httpclient/auth/InvalidCredentialsException.java,v \
1.4 2004/05/13 04:02:00 mbecke Exp $ + * $HeadURL$
  * $Revision$
  * $Date$
  *
@@ -28,17 +28,20 @@
  *
  */
 
-package org.apache.commons.httpclient.auth;
+package org.apache.http.auth;
 
 /**
  * Authentication credentials required to respond to a authentication 
  * challenge are invalid
  *
- * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  * 
  * @since 3.0
  */
 public class InvalidCredentialsException extends AuthenticationException {
+
+    private static final long serialVersionUID = -4834003835215460648L;
+
     /**
      * Creates a new InvalidCredentialsException with a <tt>null</tt> detail \
                message. 
      */

Copied: jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/MalformedChallengeException.java \
(from r487204, jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/MalformedChallengeException.java)
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/src/java/org \
/apache/http/auth/MalformedChallengeException.java?view=diff&rev=487318&p1=jakarta/com \
mons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/MalformedChal \
lengeException.java&r1=487204&p2=jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/MalformedChallengeException.java&r2=487318
 ==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/MalformedChallengeException.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/auth/MalformedChallengeException.java \
Thu Dec 14 11:42:40 2006 @@ -1,5 +1,5 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-common \
s//httpclient/src/java/org/apache/commons/httpclient/auth/MalformedChallengeException.java,v \
1.6 2004/05/13 04:02:00 mbecke Exp $ + * $HeadURL$
  * $Revision$
  * $Date$
  *
@@ -28,19 +28,21 @@
  *
  */
 
-package org.apache.commons.httpclient.auth;
+package org.apache.http.auth;
 
-import org.apache.commons.httpclient.ProtocolException;
+import org.apache.http.ProtocolException;
 
 /**
  * Signals that authentication challenge is in some way invalid or 
  * illegal in the given context
  *
- * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  * 
  * @since 2.0
  */
 public class MalformedChallengeException extends ProtocolException {
+
+    private static final long serialVersionUID = 814586927989932284L;
 
     /**
      * Creates a new MalformedChallengeException with a <tt>null</tt> detail \
message. 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic