db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r382502 - /db/derby/code/trunk/java/engine/org/apache/derby/authentication/UserAuthenticator.java
Date Thu, 02 Mar 2006 20:23:38 GMT
Author: mikem
Date: Thu Mar  2 12:23:38 2006
New Revision: 382502

URL: http://svn.apache.org/viewcvs?rev=382502&view=rev
Log:
DERBY-1071 submitting on behalf of Sunitha Kambhampati.

Derby passes the user in a connection request as is; to the authenticateUser method. Thus
if user attribute value is delimited with quotes, the userName in authenticateUser will also
be delimited. Mentioned this explicitly in the javadoc.

Javadoc change only.


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/authentication/UserAuthenticator.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/authentication/UserAuthenticator.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/authentication/UserAuthenticator.java?rev=382502&r1=382501&r2=382502&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/authentication/UserAuthenticator.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/authentication/UserAuthenticator.java
Thu Mar  2 12:23:38 2006
@@ -38,8 +38,8 @@
  * A typical example would be to implement user authentication using
  * LDAP, Sun NIS+, or even Windows User Domain, using this interface.
  * <p>
- * <i>Note</i>: Additional connection attributes can be specified on the database
- * connection URL and/or Properties object on jdbc connection. Values
+ * <i>Note</i>: Additional connection attributes can be specified on the 
+ * database connection URL and/or Properties object on jdbc connection. Values
  * for these attributes can be retrieved at runtime by the (specialized)
  * authentication scheme to further help user authentication, if one needs
  * additional info other than user, password, and database name.
@@ -52,22 +52,46 @@
 	
 	/**
 	 * Authenticate a user's credentials.
+     * <BR>
+     * E.g. if connection url is 
+     * <code>jdbc:derby:testdb;create=true;user=Fred;password=p</code>
+     * then the userName will be Fred
+     *<BR>
+     * if connection url is 
+     * <code>jdbc:derby:testdb;create=true;user="Fred";password=p</code>
+     * then the userName will be "Fred"
+     * <BR>
 	 *
-	 * @param userName		The user's name for the connection request. May be null.
-	 * @param userPassword	The user's password for the connection request. May be null.
+	 * @param userName		The user's name for the connection request. May be 
+     *                      null.  The user name is passed in as is from the 
+     *                      connection url.  For example if user attribute 
+     *                      value in connection url is delimited with quotes, 
+     *                      then the userName passed here will also have the 
+     *                      delimiter quotes. Derby will pass in the user name 
+     *                      that is set on connection url, without changing the
+     *                      casing. 
+     *
+	 * @param userPassword	The user's password for the connection request. 
+     *                      May be null.
+     *
 	 * @param databaseName	The database that the user wants to connect to.
 	 *						Will be null if this is system level authentication.
-	 * @param info			A Properties object that contains additional
-	 * connection information, that can help to authenticate the user. It
-	 * has properties of the 'info' object passed as part of
-	 * DriverManager.getConnection() call and any
-	 * attributes set on the JDBC URL.
-
-		@return	false if the connection request should be denied, true if the connection request
should proceed.
-		If false is returned the connection attempt will receive a SQLException with SQL State
08004.
+     *
+	 * @param info			A Properties object that contains additional 
+     *                      connection information, that can help to 
+     *                      authenticate the user. It has properties of the 
+     *                      'info' object passed as part of 
+     *                      DriverManager.getConnection() call and any 
+     *                      attributes set on the JDBC URL.
+     *
+     * @return	false if the connection request should be denied, true if the 
+     *          connection request should proceed.  If false is returned the 
+     *          connection attempt will receive a SQLException with SQL State 
+     *          08004.
 	 *
-	 * @exception java.sql.SQLException An exception processing the request, connection request
will be denied.
-		The SQL exception will be returned to the connection attempt.
+	 * @exception java.sql.SQLException An exception processing the request, 
+     *            connection request will be denied.  The SQL exception will 
+     *            be returned to the connection attempt.
 	 */
 	public boolean	authenticateUser(String userName,
 								 String userPassword,



Mime
View raw message