org.apache.derby.impl.jdbc.authentication
Class BasicAuthenticationServiceImpl

java.lang.Object
  extended by org.apache.derby.impl.jdbc.authentication.AuthenticationServiceBase
      extended by org.apache.derby.impl.jdbc.authentication.BasicAuthenticationServiceImpl
All Implemented Interfaces:
UserAuthenticator, AuthenticationService, ModuleControl, ModuleSupportable, PropertySetCallback

public final class BasicAuthenticationServiceImpl
extends AuthenticationServiceBase
implements UserAuthenticator

This authentication service is the basic Derby user authentication level support. It is activated upon setting derby.authentication.provider database or system property to 'BUILTIN'.

It instantiates & calls the basic User authentication scheme at runtime.

In 2.0, users can now be defined as database properties. If derby.database.propertiesOnly is set to true, then in this case, only users defined as database properties for the current database will be considered.


Field Summary
 
Fields inherited from class org.apache.derby.impl.jdbc.authentication.AuthenticationServiceBase
authenticationScheme, AuthenticationTrace, ID_PATTERN_NEW_SCHEME, MAGICLEN_NEWENCRYPT_SCHEME, SECMEC_USRSSBPWD
 
Fields inherited from interface org.apache.derby.iapi.jdbc.AuthenticationService
MODULE
 
Constructor Summary
BasicAuthenticationServiceImpl()
           
 
Method Summary
 boolean authenticateUser(java.lang.String userName, java.lang.String userPassword, java.lang.String databaseName, java.util.Properties info)
          Authenticate the passed-in user's credentials.
 void boot(boolean create, java.util.Properties properties)
          Start this module.
 boolean canSupport(java.util.Properties properties)
          Check if we should activate this authentication service.
 
Methods inherited from class org.apache.derby.impl.jdbc.authentication.AuthenticationServiceBase
apply, authenticate, encryptPassword, getDatabaseProperty, getProperty, getSystemProperty, init, map, requireAuthentication, setAuthenticationService, stop, substitutePassword, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicAuthenticationServiceImpl

public BasicAuthenticationServiceImpl()
Method Detail

canSupport

public boolean canSupport(java.util.Properties properties)
Check if we should activate this authentication service.

Specified by:
canSupport in interface ModuleSupportable
Returns:
true if this instance can be used, false otherwise.

boot

public void boot(boolean create,
                 java.util.Properties properties)
          throws StandardException
Description copied from class: AuthenticationServiceBase
Start this module. In this case, nothing needs to be done.

Specified by:
boot in interface ModuleControl
Overrides:
boot in class AuthenticationServiceBase
Throws:
StandardException - upon failure to load/boot the expected authentication service.
See Also:
ModuleControl.boot(boolean, java.util.Properties)

authenticateUser

public boolean authenticateUser(java.lang.String userName,
                                java.lang.String userPassword,
                                java.lang.String databaseName,
                                java.util.Properties info)
Authenticate the passed-in user's credentials.

Specified by:
authenticateUser in interface UserAuthenticator
Parameters:
userName - The user's name used to connect to JBMS system
userPassword - The user's password used to connect to JBMS system
databaseName - The database which the user wants to connect to.
info - Additional jdbc connection info.
Returns:
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.

Built on Sat 2009-11-28 18:44:18-0800, from revision 885187

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.