1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5
<!-- Generated by javadoc (build 1.6.0_01-dp) on Tue Aug 26 06:30:04 PDT 2008 -->
7
UserAuthenticator (Apache Derby 10.4 API Documentation)
10
<META NAME="date" CONTENT="2008-08-26">
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
14
<SCRIPT type="text/javascript">
15
function windowTitle()
17
if (location.href.indexOf('is-external=true') == -1) {
18
parent.document.title="UserAuthenticator (Apache Derby 10.4 API Documentation)";
27
<BODY BGCOLOR="white" onload="windowTitle();">
31
<!-- ========= START OF TOP NAVBAR ======= -->
32
<A NAME="navbar_top"><!-- --></A>
33
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
36
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37
<A NAME="navbar_top_firstrow"><!-- --></A>
38
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39
<TR ALIGN="center" VALIGN="top">
40
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
41
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
42
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
43
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
44
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
45
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
46
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
50
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
51
Apache Derby 10.4</EM>
56
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57
PREV CLASS
58
NEXT CLASS</FONT></TD>
59
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
60
<A HREF="../../../../index.html?org/apache/derby/authentication/UserAuthenticator.html" target="_top"><B>FRAMES</B></A>
61
<A HREF="UserAuthenticator.html" target="_top"><B>NO FRAMES</B></A>
62
<SCRIPT type="text/javascript">
65
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
70
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
77
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
79
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
83
<A NAME="skip-navbar_top"></A>
84
<!-- ========= END OF TOP NAVBAR ========= -->
87
<!-- ======== START OF CLASS DATA ======== -->
90
org.apache.derby.authentication</FONT>
92
Interface UserAuthenticator</H2>
95
<DT><PRE>public interface <B>UserAuthenticator</B></DL>
99
The UserAuthenticator interface provides operations to authenticate
100
a user's credentials in order to successfully connect to a database.
102
Any user authentication schemes could be implemented using this interface
103
and registered at start-up time.
105
If an application requires its own authentication scheme, then it can
106
implement this interface and register as the authentication scheme
107
that Derby should call upon connection requests to the system.
108
See the dcoumentation for the property <I>derby.authentication.provider</I>
110
A typical example would be to implement user authentication using
111
LDAP, Sun NIS+, or even Windows User Domain, using this interface.
113
<i>Note</i>: Additional connection attributes can be specified on the
114
database connection URL and/or Properties object on jdbc connection. Values
115
for these attributes can be retrieved at runtime by the (specialized)
116
authentication scheme to further help user authentication, if one needs
117
additional info other than user, password, and database name.
125
<!-- ========== METHOD SUMMARY =========== -->
127
<A NAME="method_summary"><!-- --></A>
128
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
129
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
130
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
131
<B>Method Summary</B></FONT></TH>
133
<TR BGCOLOR="white" CLASS="TableRowColor">
134
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
135
<CODE> boolean</CODE></FONT></TD>
136
<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,
137
java.lang.String userPassword,
138
java.lang.String databaseName,
139
java.util.Properties info)</CODE>
142
Authenticate a user's credentials.</TD>
148
<!-- ============ METHOD DETAIL ========== -->
150
<A NAME="method_detail"><!-- --></A>
151
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
152
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
153
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
154
<B>Method Detail</B></FONT></TH>
158
<A NAME="authenticateUser(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)"><!-- --></A><H3>
159
authenticateUser</H3>
161
boolean <B>authenticateUser</B>(java.lang.String userName,
162
java.lang.String userPassword,
163
java.lang.String databaseName,
164
java.util.Properties info)
165
throws java.sql.SQLException</PRE>
167
<DD>Authenticate a user's credentials.
169
E.g. if connection url is
170
<code>jdbc:derby:testdb;user=Fred;password=ScT7dmM2</code>
171
then the userName will be Fred and within the Derby user authorization
172
system, Fred becomes a case-insensitive authorization identifier and
176
<code>jdbc:derby:testdb;user="Fred";password=ScT7dmM2</code>
177
then the userName will be "Fred" and within the Derby user authorization
178
system, Fred becomes a case-sensitive authorization identifier and is
183
<DT><B>Parameters:</B><DD><CODE>userName</CODE> - The user's name for the connection request. May be
184
null. The user name is passed in as is from the
186
Derby will pass in the user name that is set on
187
connection request as is, without changing the
188
casing and without removing the delimiter quotes
189
if any.<DD><CODE>userPassword</CODE> - The user's password for the connection request.
190
May be null.<DD><CODE>databaseName</CODE> - The database that the user wants to connect to.
191
Will be null if this is system level authentication.<DD><CODE>info</CODE> - A Properties object that contains additional
192
connection information, that can help to
193
authenticate the user. It has properties of the
194
'info' object passed as part of
195
DriverManager.getConnection() call and any
196
attributes set on the JDBC URL.
197
<DT><B>Returns:</B><DD>false if the connection request should be denied, true if the
198
connection request should proceed. If false is returned the
199
connection attempt will receive a SQLException with SQL State
202
<DD><CODE>java.sql.SQLException</CODE> - An exception processing the request,
203
connection request will be denied. The SQL exception will
204
be returned to the connection attempt.</DL>
207
<!-- ========= END OF CLASS DATA ========= -->
211
<!-- ======= START OF BOTTOM NAVBAR ====== -->
212
<A NAME="navbar_bottom"><!-- --></A>
213
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
214
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
216
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
217
<A NAME="navbar_bottom_firstrow"><!-- --></A>
218
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
219
<TR ALIGN="center" VALIGN="top">
220
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
221
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
222
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
223
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
224
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
225
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
226
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
230
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
231
Built on Tue 2008-08-26 06:30:01-0700, from revision 689064</EM>
236
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
237
PREV CLASS
238
NEXT CLASS</FONT></TD>
239
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
240
<A HREF="../../../../index.html?org/apache/derby/authentication/UserAuthenticator.html" target="_top"><B>FRAMES</B></A>
241
<A HREF="UserAuthenticator.html" target="_top"><B>NO FRAMES</B></A>
242
<SCRIPT type="text/javascript">
245
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
250
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
257
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
258
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
259
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
260
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
263
<A NAME="skip-navbar_bottom"></A>
264
<!-- ======== END OF BOTTOM NAVBAR ======= -->
267
Apache Derby 10.4 API Documentation - <i>Copyright © 2004,2008 The Apache Software Foundation. All Rights Reserved.</i>