/[classpath]/classpath/java/net/Authenticator.java
ViewVC logotype

Diff of /classpath/java/net/Authenticator.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by mark, Sun Jul 14 20:00:08 2002 UTC revision 1.9 by mkoch, Mon Aug 26 16:30:43 2002 UTC
# Line 53  package java.net; Line 53  package java.net;
53    * @since 1.2    * @since 1.2
54    *    *
55    * @author Aaron M. Renn (arenn@urbanophile.com)    * @author Aaron M. Renn (arenn@urbanophile.com)
56      * @status Believed to be JDK 1.4 complete
57    */    */
58  public abstract class Authenticator  public abstract class Authenticator
59  {  {
# Line 75  private static Authenticator default_aut Line 76  private static Authenticator default_aut
76   */   */
77    
78  /**  /**
79      * The hostname of the site requesting authentication
80      */
81    private String host;
82    
83    /**
84    * InternetAddress of the site requesting authentication    * InternetAddress of the site requesting authentication
85    */    */
86  private InetAddress addr;  private InetAddress addr;
# Line 156  setDefault(Authenticator def_auth) Line 162  setDefault(Authenticator def_auth)
162  public static PasswordAuthentication  public static PasswordAuthentication
163  requestPasswordAuthentication(InetAddress addr, int port, String protocol,  requestPasswordAuthentication(InetAddress addr, int port, String protocol,
164                                String prompt, String scheme)                                String prompt, String scheme)
165      throws SecurityException
166    {
167      return(requestPasswordAuthentication (null, addr, port, protocol,
168                                            prompt, scheme));
169    }
170    
171    /**
172     * @since 1.4
173     */
174    public static PasswordAuthentication
175    requestPasswordAuthentication(String host, InetAddress addr, int port,
176                                  String protocol, String prompt, String scheme)
177      throws SecurityException
178  {  {
179    SecurityManager sm = System.getSecurityManager();    SecurityManager sm = System.getSecurityManager();
180    if (sm != null)    if (sm != null)
# Line 164  requestPasswordAuthentication(InetAddres Line 183  requestPasswordAuthentication(InetAddres
183    if (default_authenticator == null)    if (default_authenticator == null)
184      return(null);      return(null);
185    
186      default_authenticator.host = host;
187    default_authenticator.addr = addr;    default_authenticator.addr = addr;
188    default_authenticator.port = port;    default_authenticator.port = port;
189    default_authenticator.protocol = protocol;    default_authenticator.protocol = protocol;
# Line 173  requestPasswordAuthentication(InetAddres Line 193  requestPasswordAuthentication(InetAddres
193    return(default_authenticator.getPasswordAuthentication());    return(default_authenticator.getPasswordAuthentication());
194  }  }
195    
196    /**
197     *  @since 1.4
198     */
199    protected final String getRequestingHost()
200    {
201      return(host);
202    }
203    
204  /*************************************************************************/  /*************************************************************************/
205    
206  /*  /*

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26