PageRenderTime 44ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/projects/jre-1.6.0/db/javadoc/jdbc3/org/apache/derby/authentication/UserAuthenticator.html

https://gitlab.com/essere.lab.public/qualitas.class-corpus
HTML | 269 lines | 222 code | 27 blank | 20 comment | 0 complexity | 7609df78d2a8a5850eda2b901071df7e MD5 | raw file
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.6.0_13) on Tue Sep 21 16:20:45 PDT 2010 -->
  6. <TITLE>
  7. UserAuthenticator (Apache Derby 10.6 API Documentation)
  8. </TITLE>
  9. <META NAME="date" CONTENT="2010-09-21">
  10. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
  11. <SCRIPT type="text/javascript">
  12. function windowTitle()
  13. {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="UserAuthenticator (Apache Derby 10.6 API Documentation)";
  16. }
  17. }
  18. </SCRIPT>
  19. <NOSCRIPT>
  20. </NOSCRIPT>
  21. </HEAD>
  22. <BODY BGCOLOR="white" onload="windowTitle();">
  23. <HR>
  24. <!-- ========= START OF TOP NAVBAR ======= -->
  25. <A NAME="navbar_top"><!-- --></A>
  26. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  27. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  28. <TR>
  29. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  30. <A NAME="navbar_top_firstrow"><!-- --></A>
  31. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  32. <TR ALIGN="center" VALIGN="top">
  33. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  34. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  35. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  36. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  37. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  38. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  39. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  40. </TR>
  41. </TABLE>
  42. </TD>
  43. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  44. Apache Derby 10.6</EM>
  45. </TD>
  46. </TR>
  47. <TR>
  48. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  49. &nbsp;PREV CLASS&nbsp;
  50. &nbsp;NEXT CLASS</FONT></TD>
  51. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  52. <A HREF="../../../../index.html?org/apache/derby/authentication/UserAuthenticator.html" target="_top"><B>FRAMES</B></A> &nbsp;
  53. &nbsp;<A HREF="UserAuthenticator.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  54. &nbsp;<SCRIPT type="text/javascript">
  55. <!--
  56. if(window==top) {
  57. document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  58. }
  59. //-->
  60. </SCRIPT>
  61. <NOSCRIPT>
  62. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  63. </NOSCRIPT>
  64. </FONT></TD>
  65. </TR>
  66. <TR>
  67. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  68. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  69. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  70. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  71. </TR>
  72. </TABLE>
  73. <A NAME="skip-navbar_top"></A>
  74. <!-- ========= END OF TOP NAVBAR ========= -->
  75. <HR>
  76. <!-- ======== START OF CLASS DATA ======== -->
  77. <H2>
  78. <FONT SIZE="-1">
  79. org.apache.derby.authentication</FONT>
  80. <BR>
  81. Interface UserAuthenticator</H2>
  82. <HR>
  83. <DL>
  84. <DT><PRE>public interface <B>UserAuthenticator</B></DL>
  85. </PRE>
  86. <P>
  87. The UserAuthenticator interface provides operations to authenticate
  88. a user's credentials in order to successfully connect to a database.
  89. Any user authentication schemes could be implemented using this interface
  90. and registered at start-up time.
  91. <p>
  92. If an application requires its own authentication scheme, then it can
  93. implement this interface and register as the authentication scheme
  94. that Derby should call upon connection requests to the system.
  95. See the dcoumentation for the property <I>derby.authentication.provider</I>
  96. <p>
  97. A typical example would be to implement user authentication using
  98. LDAP, Sun NIS+, or even Windows User Domain, using this interface.
  99. <p>
  100. <i>Note</i>: Additional connection attributes can be specified on the
  101. database connection URL and/or Properties object on jdbc connection. Values
  102. for these attributes can be retrieved at runtime by the (specialized)
  103. authentication scheme to further help user authentication, if one needs
  104. additional info other than user, password, and database name.
  105. <P>
  106. <P>
  107. <HR>
  108. <P>
  109. <!-- ========== METHOD SUMMARY =========== -->
  110. <A NAME="method_summary"><!-- --></A>
  111. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  112. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  113. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  114. <B>Method Summary</B></FONT></TH>
  115. </TR>
  116. <TR BGCOLOR="white" CLASS="TableRowColor">
  117. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  118. <CODE>&nbsp;boolean</CODE></FONT></TD>
  119. <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&nbsp;userName,
  120. java.lang.String&nbsp;userPassword,
  121. java.lang.String&nbsp;databaseName,
  122. java.util.Properties&nbsp;info)</CODE>
  123. <BR>
  124. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Authenticate a user's credentials.</TD>
  125. </TR>
  126. </TABLE>
  127. &nbsp;
  128. <P>
  129. <!-- ============ METHOD DETAIL ========== -->
  130. <A NAME="method_detail"><!-- --></A>
  131. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  132. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  133. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  134. <B>Method Detail</B></FONT></TH>
  135. </TR>
  136. </TABLE>
  137. <A NAME="authenticateUser(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)"><!-- --></A><H3>
  138. authenticateUser</H3>
  139. <PRE>
  140. boolean <B>authenticateUser</B>(java.lang.String&nbsp;userName,
  141. java.lang.String&nbsp;userPassword,
  142. java.lang.String&nbsp;databaseName,
  143. java.util.Properties&nbsp;info)
  144. throws java.sql.SQLException</PRE>
  145. <DL>
  146. <DD>Authenticate a user's credentials.
  147. <BR>
  148. E.g. if connection url is
  149. <code>jdbc:derby:testdb;user=Fred;password=ScT7dmM2</code>
  150. then the userName will be Fred and within the Derby user authorization
  151. system, Fred becomes a case-insensitive authorization identifier and
  152. is known as FRED
  153. <BR>
  154. if connection url is
  155. <code>jdbc:derby:testdb;user="Fred";password=ScT7dmM2</code>
  156. then the userName will be "Fred" and within the Derby user authorization
  157. system, Fred becomes a case-sensitive authorization identifier and is
  158. known as Fred
  159. <BR>
  160. <P>
  161. <DD><DL>
  162. <DT><B>Parameters:</B><DD><CODE>userName</CODE> - The user's name for the connection request. May be
  163. null. The user name is passed in as is from the
  164. connection request.
  165. Derby will pass in the user name that is set on
  166. connection request as is, without changing the
  167. casing and without removing the delimiter quotes
  168. if any.<DD><CODE>userPassword</CODE> - The user's password for the connection request.
  169. May be null.<DD><CODE>databaseName</CODE> - The database that the user wants to connect to.
  170. Will be null if this is system level authentication.<DD><CODE>info</CODE> - A Properties object that contains additional
  171. connection information, that can help to
  172. authenticate the user. It has properties of the
  173. 'info' object passed as part of
  174. DriverManager.getConnection() call and any
  175. attributes set on the JDBC URL.
  176. <DT><B>Returns:</B><DD>false if the connection request should be denied, true if the
  177. connection request should proceed. If false is returned the
  178. connection attempt will receive a SQLException with SQL State
  179. 08004.
  180. <DT><B>Throws:</B>
  181. <DD><CODE>java.sql.SQLException</CODE> - An exception processing the request,
  182. connection request will be denied. The SQL exception will
  183. be returned to the connection attempt.</DL>
  184. </DD>
  185. </DL>
  186. <!-- ========= END OF CLASS DATA ========= -->
  187. <HR>
  188. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  189. <A NAME="navbar_bottom"><!-- --></A>
  190. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  191. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  192. <TR>
  193. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  194. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  195. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  196. <TR ALIGN="center" VALIGN="top">
  197. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  198. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  199. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  200. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  201. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  202. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  203. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  204. </TR>
  205. </TABLE>
  206. </TD>
  207. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  208. Built on Tue 2010-09-21 16:20:41-0700, from revision 999685</EM>
  209. </TD>
  210. </TR>
  211. <TR>
  212. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  213. &nbsp;PREV CLASS&nbsp;
  214. &nbsp;NEXT CLASS</FONT></TD>
  215. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  216. <A HREF="../../../../index.html?org/apache/derby/authentication/UserAuthenticator.html" target="_top"><B>FRAMES</B></A> &nbsp;
  217. &nbsp;<A HREF="UserAuthenticator.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  218. &nbsp;<SCRIPT type="text/javascript">
  219. <!--
  220. if(window==top) {
  221. document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  222. }
  223. //-->
  224. </SCRIPT>
  225. <NOSCRIPT>
  226. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  227. </NOSCRIPT>
  228. </FONT></TD>
  229. </TR>
  230. <TR>
  231. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  232. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  233. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  234. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  235. </TR>
  236. </TABLE>
  237. <A NAME="skip-navbar_bottom"></A>
  238. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  239. <HR>
  240. Apache Derby 10.6 API Documentation - <i>Copyright &copy; 2004,2008 The Apache Software Foundation. All Rights Reserved.</i>
  241. </BODY>
  242. </HTML>