public final class XmlInMemoryAuthenticatorProvider extends Object implements InMemoryAuthenticator.Provider
InMemoryAuthenticator.Provider
implementation that loads the required username/password data from
a specified XML file.Modifier and Type | Method and Description |
---|---|
static InMemoryAuthenticator |
buildAuthenticator(XmlConfiguration xmlConfig)
Returns a new
InMemoryAuthenticator instance based on the passed XmlConfiguration instance. |
static Map<String,String> |
buildEntries(List<XmlSubject> subjects)
Transforms the passed
List of XmlSubject instances into a string-string map of username/password
entries. |
static XmlInMemoryAuthenticatorProvider |
New(File xmlFile)
Creates a new
XmlInMemoryAuthenticatorProvider instance that uses the passed File instance
to read the configuration. |
InMemoryAuthenticator |
provideAuthenticator()
Creates a new
InMemoryAuthenticator instance from the configuration defined in the xml file. |
static InMemoryAuthenticator |
provideAuthenticatorFromFile(File xmlFile)
Read the authentication data from the passed file and returns an new
InMemoryAuthenticator instance
based on that data. |
public static final XmlInMemoryAuthenticatorProvider New(File xmlFile)
XmlInMemoryAuthenticatorProvider
instance that uses the passed File
instance
to read the configuration.xmlFile
- the xml file to read the configuration from.XmlInMemoryAuthenticatorProvider
instancepublic static InMemoryAuthenticator provideAuthenticatorFromFile(File xmlFile)
InMemoryAuthenticator
instance
based on that data.xmlFile
- the xml file to read the configuration from.InMemoryAuthenticator
instance.buildAuthenticator(XmlConfiguration)
public static InMemoryAuthenticator buildAuthenticator(XmlConfiguration xmlConfig)
InMemoryAuthenticator
instance based on the passed XmlConfiguration
instance.xmlConfig
- the XmlConfiguration
instance containing the configuration data.InMemoryAuthenticator
instance based on the passed data.public static Map<String,String> buildEntries(List<XmlSubject> subjects)
List
of XmlSubject
instances into a string-string map of username/password
entries.subjects
- the List
of XmlSubject
instances from which the entries shall be built.Map
instance.public final InMemoryAuthenticator provideAuthenticator()
InMemoryAuthenticator
instance from the configuration defined in the xml file.provideAuthenticator
in interface AuthenticatorProvider<CredentialsUsernamePassword,Boolean>
provideAuthenticator
in interface InMemoryAuthenticator.Provider
InMemoryAuthenticator
instance.