Package org.conical.common.bbl.auth
Class AuthConfig
java.lang.Object
org.conical.common.bbl.auth.AuthConfig
- All Implemented Interfaces:
Comparable<AuthConfig>,Comparator<AuthConfig>
Holds values used to configure and determine how an
Authenticator
retrieves access roles and other verification information for applications.- Author:
- rdoherty
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAn authorization source type (what type of resource is being queried for authorization credentials). -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNo-param constructor.AuthConfig(String bundleName) Constructor takes a resource bundle name and parses it for required parameters -
Method Summary
Modifier and TypeMethodDescriptionvoidAsserts that properties of this configuration have all been set.intcompare(AuthConfig o1, AuthConfig o2) Implementation of compare to allow sorting of AuthConfigsintImplementation of compareTo to allow sorting of AuthConfigs.Creates a copy of this object and returns itbooleangetType()inthashCode()Override of hashCode to complement equals()voidsetAuthClassName(String authClassName) voidsetConnectionUrl(String connectionUrl) voidsetLoginName(String loginName) voidsetPassword(String password) voidsetType(AuthConfig.Type type) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
AUTH_TYPE
- See Also:
-
AUTH_CONNECTION_URL
- See Also:
-
AUTH_NAME
- See Also:
-
AUTH_PASSWORD
- See Also:
-
AUTH_CLASS
- See Also:
-
-
Constructor Details
-
AuthConfig
public AuthConfig()No-param constructor. User is required to set attributes. -
AuthConfig
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
- Returns:
- authorization type for this configuration
-
setType
- Parameters:
type- type to set on this configuration
-
getConnectionUrl
- Returns:
- connection type for this configuration
-
setConnectionUrl
- Parameters:
connectionUrl- url to set for this configuration
-
getLoginName
- Returns:
- login name for this configuration
-
setLoginName
- Parameters:
loginName- login name to set for this configuration
-
getPassword
- Returns:
- password for this configuration
-
setPassword
- Parameters:
password- password to set for this configuration
-
getAuthClassName
- Returns:
- class name of custom authenticator
-
setAuthClassName
- Parameters:
authClassName- custom authentication class for this configuration
-
createCopy
Creates a copy of this object and returns it- Returns:
- copy with identical config params
-
compare
Implementation of compare to allow sorting of AuthConfigs- Specified by:
comparein interfaceComparator<AuthConfig>
-
compareTo
Implementation of compareTo to allow sorting of AuthConfigs. Simply calls compare(this, o).- Specified by:
compareToin interfaceComparable<AuthConfig>
-
equals
- Specified by:
equalsin interfaceComparator<AuthConfig>- Overrides:
equalsin classObject
-
hashCode
public int hashCode()Override of hashCode to complement equals() -
assertComplete
Asserts that properties of this configuration have all been set.- Throws:
AuthenticationException- if they have not
-