Class AuthFactory

java.lang.Object
org.conical.common.bbl.auth.AuthFactory

public class AuthFactory extends Object
Responsible for returning an implementation of Authenticator appropriate for the given AuthConfig.
Author:
rdoherty
  • Constructor Details

    • AuthFactory

      public AuthFactory()
  • Method Details

    • getAuthenticator

      public static Authenticator getAuthenticator() throws AuthenticationException
      Returns the default Authenticator, which connects to a database using the BBL standard JNDI name under which a data source to the BBL authentication database should be registered.
      Returns:
      default Authenticator
      Throws:
      AuthenticationException - if error occurs creating Authenticator
    • getAuthenticator

      public static Authenticator getAuthenticator(AuthConfig config) throws AuthenticationException
      Checks config and returns an appropriate Authenticator.
      Parameters:
      config - config for which to create an Authenticator
      Returns:
      appropriate Authenticator
      Throws:
      AuthenticationException - if error occurs creating Authenticator
      UnsupportedOperationException - if AuthConfig type is not supported