public class XmlFileAuthorizationCallback extends DefaultAuthorizationCallback
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>
| Constructor and Description |
|---|
XmlFileAuthorizationCallback()
Default Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Configuration config)
Configures the callback.
|
void |
configure(File file)
Configures the callback from the XML file.
|
void |
configure(String file)
Configures the callback from the XML file.
|
getName, getPassword, setName, setPasswordpublic XmlFileAuthorizationCallback()
public void configure(Configuration config) throws ConfigurationException
configure in interface IConfigurableconfigure in class DefaultAuthorizationCallbackconfig - - configuration objectConfigurationException - - when configuration failspublic void configure(String file) throws ConfigurationException
file - filenameConfigurationExceptionpublic void configure(File file) throws ConfigurationException
file - fileConfigurationExceptionCopyright © 2014. All rights reserved.