Package rs.baselib.security
Class PropertiesFileAuthorizationCallback
java.lang.Object
rs.baselib.security.AbstractAuthorizationCallback
rs.baselib.security.SimpleAuthorizationCallback
rs.baselib.security.DefaultAuthorizationCallback
rs.baselib.security.PropertiesFileAuthorizationCallback
- All Implemented Interfaces:
IConfigurable
,AuthorizationCallback
Implements authorization information retrieval from a properties file.
Configuration:
<AuthorizationCallback class="rs.baselib.security.PropertiesFileAuthorizationCallback"> <!-- The properties file name. --> <File>/path/to/file.properties</File> </AuthorizationCallback>
The properties file itself shall look like this:
login=your-login password=your-password
- Author:
- Ralph Schuster
-
Constructor Summary
-
Method Summary
Methods inherited from class rs.baselib.security.AbstractAuthorizationCallback
getName, getPassword, setName, setPassword
-
Constructor Details
-
PropertiesFileAuthorizationCallback
public PropertiesFileAuthorizationCallback()Default Constructor.
-
-
Method Details
-
configure
Configures the callback. Configuration takes place from a Properties file whose path is contained within element <File>. The properties file itself must contain values for "login" and "password" properties.- Specified by:
configure
in interfaceIConfigurable
- Overrides:
configure
in classDefaultAuthorizationCallback
- Parameters:
config
- - configuration object- Throws:
ConfigurationException
- - when configuration fails
-
configure
Configures the callback from the properties file.- Parameters:
file
- filename- Throws:
ConfigurationException
- when configuration fails
-
configure
Configures the callback from the properties file.- Parameters:
file
- file- Throws:
ConfigurationException
- when configuration fails
-