Class SQLAuthenticator
java.lang.Object
org.deltava.security.SQLAuthenticator
- All Implemented Interfaces:
Closeable,AutoCloseable,Authenticator
- Direct Known Subclasses:
ApacheSQLAuthenticator,MultiAuthenticator
An abstract class to support Authenticators that use a JDBC Connection Pool.
- Since:
- 1.0
- Version:
- 9.0
- Author:
- Luke
-
Field Summary
FieldsFields inherited from interface org.deltava.security.Authenticator
DEFAULT_PROPS_FILE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Clears the JDBC connection for an Authenticator to use.protected ConnectionHelper method to return a JDBC connection to the data source.voidInitializes the Authenticator.voidProvides the JDBC connection for this Authenticator to use.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.deltava.security.Authenticator
accepts, add, authenticate, contains, disable, remove, rename, updatePassword
-
Field Details
-
_props
-
-
Constructor Details
-
SQLAuthenticator
public SQLAuthenticator()
-
-
Method Details
-
setConnection
Provides the JDBC connection for this Authenticator to use.- Parameters:
c- the Connection to use
-
close
public void close()Clears the JDBC connection for an Authenticator to use.- Specified by:
closein interfaceAuthenticator- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
init
Initializes the Authenticator.- Specified by:
initin interfaceAuthenticator- Parameters:
propsFile- the property file- Throws:
SecurityException- if the properties cannot be loaded
-
getConnection
Helper method to return a JDBC connection to the data source.- Returns:
- a JDBC connection
-