/projects/jre-1.6.0/db/javadoc/jdbc3/org/apache/derby/authentication/UserAuthenticator.html
HTML | 269 lines | 222 code | 27 blank | 20 comment | 0 complexity | 7609df78d2a8a5850eda2b901071df7e MD5 | raw file
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <!--NewPage-->
- <HTML>
- <HEAD>
- <!-- Generated by javadoc (build 1.6.0_13) on Tue Sep 21 16:20:45 PDT 2010 -->
- <TITLE>
- UserAuthenticator (Apache Derby 10.6 API Documentation)
- </TITLE>
-
- <META NAME="date" CONTENT="2010-09-21">
-
- <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
-
- <SCRIPT type="text/javascript">
- function windowTitle()
- {
- if (location.href.indexOf('is-external=true') == -1) {
- parent.document.title="UserAuthenticator (Apache Derby 10.6 API Documentation)";
- }
- }
- </SCRIPT>
- <NOSCRIPT>
- </NOSCRIPT>
-
- </HEAD>
-
- <BODY BGCOLOR="white" onload="windowTitle();">
- <HR>
-
-
- <!-- ========= START OF TOP NAVBAR ======= -->
- <A NAME="navbar_top"><!-- --></A>
- <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
- <TR>
- <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
- <A NAME="navbar_top_firstrow"><!-- --></A>
- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
- <TR ALIGN="center" VALIGN="top">
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
- <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
- </TR>
- </TABLE>
- </TD>
- <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
- Apache Derby 10.6</EM>
- </TD>
- </TR>
-
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- PREV CLASS
- NEXT CLASS</FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../index.html?org/apache/derby/authentication/UserAuthenticator.html" target="_top"><B>FRAMES</B></A>
- <A HREF="UserAuthenticator.html" target="_top"><B>NO FRAMES</B></A>
- <SCRIPT type="text/javascript">
- <!--
- if(window==top) {
- document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
- }
- //-->
- </SCRIPT>
- <NOSCRIPT>
- <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
- </NOSCRIPT>
-
-
- </FONT></TD>
- </TR>
- <TR>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
- </TR>
- </TABLE>
- <A NAME="skip-navbar_top"></A>
- <!-- ========= END OF TOP NAVBAR ========= -->
-
- <HR>
- <!-- ======== START OF CLASS DATA ======== -->
- <H2>
- <FONT SIZE="-1">
- org.apache.derby.authentication</FONT>
- <BR>
- Interface UserAuthenticator</H2>
- <HR>
- <DL>
- <DT><PRE>public interface <B>UserAuthenticator</B></DL>
- </PRE>
-
- <P>
- The UserAuthenticator interface provides operations to authenticate
- a user's credentials in order to successfully connect to a database.
-
- Any user authentication schemes could be implemented using this interface
- and registered at start-up time.
- <p>
- If an application requires its own authentication scheme, then it can
- implement this interface and register as the authentication scheme
- that Derby should call upon connection requests to the system.
- See the dcoumentation for the property <I>derby.authentication.provider</I>
- <p>
- 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
- 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.
- <P>
-
- <P>
- <HR>
-
- <P>
-
- <!-- ========== METHOD SUMMARY =========== -->
-
- <A NAME="method_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
- <B>Method Summary</B></FONT></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> boolean</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/apache/derby/authentication/UserAuthenticator.html#authenticateUser(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)">authenticateUser</A></B>(java.lang.String userName,
- java.lang.String userPassword,
- java.lang.String databaseName,
- java.util.Properties info)</CODE>
-
- <BR>
- Authenticate a user's credentials.</TD>
- </TR>
- </TABLE>
-
- <P>
-
- <!-- ============ METHOD DETAIL ========== -->
-
- <A NAME="method_detail"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
- <B>Method Detail</B></FONT></TH>
- </TR>
- </TABLE>
-
- <A NAME="authenticateUser(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)"><!-- --></A><H3>
- authenticateUser</H3>
- <PRE>
- boolean <B>authenticateUser</B>(java.lang.String userName,
- java.lang.String userPassword,
- java.lang.String databaseName,
- java.util.Properties info)
- throws java.sql.SQLException</PRE>
- <DL>
- <DD>Authenticate a user's credentials.
- <BR>
- E.g. if connection url is
- <code>jdbc:derby:testdb;user=Fred;password=ScT7dmM2</code>
- then the userName will be Fred and within the Derby user authorization
- system, Fred becomes a case-insensitive authorization identifier and
- is known as FRED
- <BR>
- if connection url is
- <code>jdbc:derby:testdb;user="Fred";password=ScT7dmM2</code>
- then the userName will be "Fred" and within the Derby user authorization
- system, Fred becomes a case-sensitive authorization identifier and is
- known as Fred
- <BR>
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>userName</CODE> - The user's name for the connection request. May be
- null. The user name is passed in as is from the
- connection request.
- Derby will pass in the user name that is set on
- connection request as is, without changing the
- casing and without removing the delimiter quotes
- if any.<DD><CODE>userPassword</CODE> - The user's password for the connection request.
- May be null.<DD><CODE>databaseName</CODE> - The database that the user wants to connect to.
- Will be null if this is system level authentication.<DD><CODE>info</CODE> - 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.
- <DT><B>Returns:</B><DD>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.
- <DT><B>Throws:</B>
- <DD><CODE>java.sql.SQLException</CODE> - An exception processing the request,
- connection request will be denied. The SQL exception will
- be returned to the connection attempt.</DL>
- </DD>
- </DL>
- <!-- ========= END OF CLASS DATA ========= -->
- <HR>
-
-
- <!-- ======= START OF BOTTOM NAVBAR ====== -->
- <A NAME="navbar_bottom"><!-- --></A>
- <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
- <TR>
- <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
- <A NAME="navbar_bottom_firstrow"><!-- --></A>
- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
- <TR ALIGN="center" VALIGN="top">
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
- <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
- </TR>
- </TABLE>
- </TD>
- <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
- Built on Tue 2010-09-21 16:20:41-0700, from revision 999685</EM>
- </TD>
- </TR>
-
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- PREV CLASS
- NEXT CLASS</FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../index.html?org/apache/derby/authentication/UserAuthenticator.html" target="_top"><B>FRAMES</B></A>
- <A HREF="UserAuthenticator.html" target="_top"><B>NO FRAMES</B></A>
- <SCRIPT type="text/javascript">
- <!--
- if(window==top) {
- document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
- }
- //-->
- </SCRIPT>
- <NOSCRIPT>
- <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
- </NOSCRIPT>
-
-
- </FONT></TD>
- </TR>
- <TR>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
- </TR>
- </TABLE>
- <A NAME="skip-navbar_bottom"></A>
- <!-- ======== END OF BOTTOM NAVBAR ======= -->
-
- <HR>
- Apache Derby 10.6 API Documentation - <i>Copyright © 2004,2008 The Apache Software Foundation. All Rights Reserved.</i>
- </BODY>
- </HTML>