Class InMemoryConfiguration
- java.lang.Object
-
- javax.security.auth.login.Configuration
-
- org.springframework.security.authentication.jaas.memory.InMemoryConfiguration
-
public class InMemoryConfiguration extends javax.security.auth.login.Configuration
An in memory representation of a JAAS configuration. The constructor accepts a Map where the key represents the name of the login context name and the value is an Array of
AppConfigurationEntry
for that login context name. A default Array ofAppConfigurationEntry
s can be specified which will be returned if a login context is specified which is undefined.
-
-
Constructor Summary
Constructors Constructor Description InMemoryConfiguration(java.util.Map<java.lang.String,javax.security.auth.login.AppConfigurationEntry[]> mappedConfigurations)
Creates a new instance with a mapping of login context name to an array ofAppConfigurationEntry
s.InMemoryConfiguration(java.util.Map<java.lang.String,javax.security.auth.login.AppConfigurationEntry[]> mappedConfigurations, javax.security.auth.login.AppConfigurationEntry[] defaultConfiguration)
Creates a new instance with a mapping of login context name to an array ofAppConfigurationEntry
s along with a default configuration that will be used if no mapping is found for the given login context name.InMemoryConfiguration(javax.security.auth.login.AppConfigurationEntry[] defaultConfiguration)
Creates a new instance with only a defaultConfiguration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.security.auth.login.AppConfigurationEntry[]
getAppConfigurationEntry(java.lang.String name)
void
refresh()
Does nothing, but required for JDK5
-
-
-
Constructor Detail
-
InMemoryConfiguration
public InMemoryConfiguration(javax.security.auth.login.AppConfigurationEntry[] defaultConfiguration)
Creates a new instance with only a defaultConfiguration. Any configuration name will result in defaultConfiguration being returned.- Parameters:
defaultConfiguration
- The result for any calls togetAppConfigurationEntry(String)
. Can benull
.
-
InMemoryConfiguration
public InMemoryConfiguration(java.util.Map<java.lang.String,javax.security.auth.login.AppConfigurationEntry[]> mappedConfigurations)
Creates a new instance with a mapping of login context name to an array ofAppConfigurationEntry
s.- Parameters:
mappedConfigurations
- each key represents a login context name and each value is an Array ofAppConfigurationEntry
s that should be used.
-
InMemoryConfiguration
public InMemoryConfiguration(java.util.Map<java.lang.String,javax.security.auth.login.AppConfigurationEntry[]> mappedConfigurations, javax.security.auth.login.AppConfigurationEntry[] defaultConfiguration)
Creates a new instance with a mapping of login context name to an array ofAppConfigurationEntry
s along with a default configuration that will be used if no mapping is found for the given login context name.- Parameters:
mappedConfigurations
- each key represents a login context name and each value is an Array ofAppConfigurationEntry
s that should be used.defaultConfiguration
- The result for any calls togetAppConfigurationEntry(String)
. Can benull
.
-
-
Method Detail
-
getAppConfigurationEntry
public javax.security.auth.login.AppConfigurationEntry[] getAppConfigurationEntry(java.lang.String name)
- Specified by:
getAppConfigurationEntry
in classjavax.security.auth.login.Configuration
-
refresh
public void refresh()
Does nothing, but required for JDK5- Overrides:
refresh
in classjavax.security.auth.login.Configuration
-
-