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