aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2002-08-28 05:24:10 +0000
committerMichael Koch <konqueror@gmx.de>2002-08-28 05:24:10 +0000
commitf68bb2341099a5d3bec803333003d36ca479cecf (patch)
tree6ad3fe18545537481adc5b25e662ce4fc19a1b56 /libjava
parent4fb48b9ebd9c0914ea3527b8d91835bdf26aea91 (diff)
2002-08-28 Michael Koch <konqueror@gmx.de>
* java/net/Authenticator.java: added some documentation. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@56628 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog4
-rw-r--r--libjava/java/net/Authenticator.java34
2 files changed, 35 insertions, 3 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 9ae3d6a6633..b200d604196 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,7 @@
+2002-08-28 Michael Koch <konqueror@gmx.de>
+
+ * java/net/Authenticator.java: added some documentation.
+
2002-08-27 Tom Tromey <tromey@redhat.com>
* java/lang/reflect/natConstructor.cc (newInstance): Initialize
diff --git a/libjava/java/net/Authenticator.java b/libjava/java/net/Authenticator.java
index f6ad9dd27b0..e1e322b3bb1 100644
--- a/libjava/java/net/Authenticator.java
+++ b/libjava/java/net/Authenticator.java
@@ -150,7 +150,7 @@ setDefault(Authenticator def_auth)
* @param port The port requesting authentication
* @param protocol The protocol requesting authentication
* @param prompt The prompt to display to the user when requesting
- authentication info
+ * authentication info
* @param scheme The authentication scheme in use
*
* @return A <code>PasswordAuthentication</code> object with the user's
@@ -169,8 +169,33 @@ requestPasswordAuthentication(InetAddress addr, int port, String protocol,
}
/**
- * @since 1.4
- */
+ * This method is called whenever a username and password for a given
+ * network operation is required. First, a security check is made to see
+ * if the caller has the "requestPasswordAuthentication"
+ * permission. If not, the method thows an exception. If there is no
+ * default <code>Authenticator</code> object, the method then returns
+ * <code>null</code>. Otherwise, the default authenticators's instance
+ * variables are initialized and it's <code>getPasswordAuthentication</code>
+ * method is called to get the actual authentication information to return.
+ * This method is the preferred one as it can be used with hostname
+ * when addr is unknown.
+ *
+ * @param host The hostname requesting authentication
+ * @param addr The address requesting authentication
+ * @param port The port requesting authentication
+ * @param protocol The protocol requesting authentication
+ * @param prompt The prompt to display to the user when requesting
+ * authentication info
+ * @param scheme The authentication scheme in use
+ *
+ * @return A <code>PasswordAuthentication</code> object with the user's
+ * authentication info.
+ *
+ * @exception SecurityException If the caller does not have permission to
+ * perform this operation
+ *
+ * @since 1.4
+ */
public static PasswordAuthentication
requestPasswordAuthentication(String host, InetAddress addr, int port,
String protocol, String prompt, String scheme)
@@ -194,6 +219,9 @@ requestPasswordAuthentication(String host, InetAddress addr, int port,
}
/**
+ * Returns the hostname of the host or proxy requesting authorization,
+ * or null if not available.
+ *
* @since 1.4
*/
protected final String getRequestingHost()