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 TypeMethodDescriptionvoid
close()
Clears the JDBC connection for an Authenticator to use.protected Connection
Helper method to return a JDBC connection to the data source.void
Initializes the Authenticator.void
Provides 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, wait
Methods 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:
close
in interfaceAuthenticator
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
init
Initializes the Authenticator.- Specified by:
init
in 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
-