Class AuthConfig

java.lang.Object
org.conical.common.bbl.auth.AuthConfig
All Implemented Interfaces:
Comparable<AuthConfig>, Comparator<AuthConfig>

public class AuthConfig extends Object implements Comparator<AuthConfig>, Comparable<AuthConfig>
Holds values used to configure and determine how an Authenticator retrieves access roles and other verification information for applications.
Author:
rdoherty
  • Field Details

  • Constructor Details

    • AuthConfig

      public AuthConfig()
      No-param constructor. User is required to set attributes.
    • AuthConfig

      public AuthConfig(String bundleName)
      Constructor takes a resource bundle name and parses it for required parameters
      Parameters:
      bundleName - name of bundle from which params will be pulled
  • Method Details

    • getType

      public AuthConfig.Type getType()
      Returns:
      authorization type for this configuration
    • setType

      public void setType(AuthConfig.Type type)
      Parameters:
      type - type to set on this configuration
    • getConnectionUrl

      public String getConnectionUrl()
      Returns:
      connection type for this configuration
    • setConnectionUrl

      public void setConnectionUrl(String connectionUrl)
      Parameters:
      connectionUrl - url to set for this configuration
    • getLoginName

      public String getLoginName()
      Returns:
      login name for this configuration
    • setLoginName

      public void setLoginName(String loginName)
      Parameters:
      loginName - login name to set for this configuration
    • getPassword

      public String getPassword()
      Returns:
      password for this configuration
    • setPassword

      public void setPassword(String password)
      Parameters:
      password - password to set for this configuration
    • getAuthClassName

      public String getAuthClassName()
      Returns:
      class name of custom authenticator
    • setAuthClassName

      public void setAuthClassName(String authClassName)
      Parameters:
      authClassName - custom authentication class for this configuration
    • createCopy

      public AuthConfig createCopy()
      Creates a copy of this object and returns it
      Returns:
      copy with identical config params
    • compare

      public int compare(AuthConfig o1, AuthConfig o2)
      Implementation of compare to allow sorting of AuthConfigs
      Specified by:
      compare in interface Comparator<AuthConfig>
    • compareTo

      public int compareTo(AuthConfig o)
      Implementation of compareTo to allow sorting of AuthConfigs. Simply calls compare(this, o).
      Specified by:
      compareTo in interface Comparable<AuthConfig>
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface Comparator<AuthConfig>
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Override of hashCode to complement equals()
      Overrides:
      hashCode in class Object
    • assertComplete

      public void assertComplete() throws AuthenticationException
      Asserts that properties of this configuration have all been set.
      Throws:
      AuthenticationException - if they have not