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
Modifier and TypeClassDescriptionstatic enum
An authorization source type (what type of resource is being queried for authorization credentials). -
Field Summary
-
Constructor Summary
ConstructorDescriptionNo-param constructor.AuthConfig
(String bundleName) Constructor takes a resource bundle name and parses it for required parameters -
Method Summary
Modifier and TypeMethodDescriptionvoid
Asserts that properties of this configuration have all been set.int
compare
(AuthConfig o1, AuthConfig o2) Implementation of compare to allow sorting of AuthConfigsint
Implementation of compareTo to allow sorting of AuthConfigs.Creates a copy of this object and returns itboolean
getType()
int
hashCode()
Override of hashCode to complement equals()void
setAuthClassName
(String authClassName) void
setConnectionUrl
(String connectionUrl) void
setLoginName
(String loginName) void
setPassword
(String password) void
setType
(AuthConfig.Type type) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods 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:
compare
in interfaceComparator<AuthConfig>
-
compareTo
Implementation of compareTo to allow sorting of AuthConfigs. Simply calls compare(this, o).- Specified by:
compareTo
in interfaceComparable<AuthConfig>
-
equals
- Specified by:
equals
in interfaceComparator<AuthConfig>
- Overrides:
equals
in 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
-