Class SQLAuthenticator

java.lang.Object
org.deltava.security.SQLAuthenticator
All Implemented Interfaces:
Closeable, AutoCloseable, Authenticator
Direct Known Subclasses:
ApacheSQLAuthenticator, MultiAuthenticator

public abstract class SQLAuthenticator extends Object implements Authenticator
An abstract class to support Authenticators that use a JDBC Connection Pool.
Since:
1.0
Version:
9.0
Author:
Luke
  • Field Details

  • Constructor Details

    • SQLAuthenticator

      public SQLAuthenticator()
  • Method Details

    • setConnection

      public void setConnection(Connection c)
      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 interface Authenticator
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • init

      public void init(String propsFile) throws SecurityException
      Initializes the Authenticator.
      Specified by:
      init in interface Authenticator
      Parameters:
      propsFile - the property file
      Throws:
      SecurityException - if the properties cannot be loaded
    • getConnection

      protected Connection getConnection()
      Helper method to return a JDBC connection to the data source.
      Returns:
      a JDBC connection