org.apache.derby.impl.jdbc.authentication
Class NativeAuthenticationServiceImpl
- java.lang.Object
-
- org.apache.derby.impl.jdbc.authentication.AuthenticationServiceBase
-
- org.apache.derby.impl.jdbc.authentication.NativeAuthenticationServiceImpl
-
- All Implemented Interfaces:
- UserAuthenticator, AuthenticationService, ModuleControl, ModuleSupportable, PropertySetCallback
public final class NativeAuthenticationServiceImpl extends AuthenticationServiceBase implements UserAuthenticator
This authentication service supports Derby NATIVE authentication.
To activate this service, set the derby.authentication.provider database or system property to a value beginning with the token "NATIVE:".
This service instantiates and calls the basic User authentication scheme at runtime.
User credentials are defined in the SYSUSERS table.
-
-
Field Summary
-
Fields inherited from class org.apache.derby.impl.jdbc.authentication.AuthenticationServiceBase
AuthenticationTrace
-
Fields inherited from interface org.apache.derby.iapi.jdbc.AuthenticationService
MODULE
-
-
Constructor Summary
Constructors Constructor and Description NativeAuthenticationServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanauthenticateUser(java.lang.String userName, java.lang.String userPassword, java.lang.String databaseName, java.util.Properties info)Authenticate the passed-in user's credentials.voidboot(boolean create, java.util.Properties properties)Start this module.booleancanSupport(java.util.Properties properties)Check if we should activate this authentication service.java.lang.StringgetSystemCredentialsDatabaseName()Override behavior in superclass-
Methods inherited from class org.apache.derby.impl.jdbc.authentication.AuthenticationServiceBase
apply, authenticate, getDatabaseProperty, getProperty, getSystemProperty, init, map, stop, validate
-
-
-
-
Method Detail
-
canSupport
public boolean canSupport(java.util.Properties properties)
Check if we should activate this authentication service.- Specified by:
canSupportin interfaceModuleSupportable- Returns:
- true if this instance can be used, false otherwise.
-
boot
public void boot(boolean create, java.util.Properties properties) throws StandardExceptionDescription copied from class:AuthenticationServiceBaseStart this module. In this case, nothing needs to be done.- Specified by:
bootin interfaceModuleControl- Overrides:
bootin classAuthenticationServiceBase- Throws:
StandardException- upon failure to load/boot the expected authentication service.- See Also:
ModuleControl.boot(boolean, java.util.Properties)
-
getSystemCredentialsDatabaseName
public java.lang.String getSystemCredentialsDatabaseName()
Override behavior in superclass- Specified by:
getSystemCredentialsDatabaseNamein interfaceAuthenticationService- Overrides:
getSystemCredentialsDatabaseNamein classAuthenticationServiceBase
-
authenticateUser
public boolean authenticateUser(java.lang.String userName, java.lang.String userPassword, java.lang.String databaseName, java.util.Properties info) throws java.sql.SQLExceptionAuthenticate the passed-in user's credentials.- Specified by:
authenticateUserin interfaceUserAuthenticator- Parameters:
userName- The user's name used to connect to JBMS systemuserPassword- The user's password used to connect to JBMS systemdatabaseName- 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.
- Throws:
java.sql.SQLException- An exception processing the request, connection request will be denied. The SQL exception will be returned to the connection attempt.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG