Package org.eclipse.jetty.jaas.spi
Class PropertyFileLoginModule
- java.lang.Object
-
- org.eclipse.jetty.jaas.spi.AbstractLoginModule
-
- org.eclipse.jetty.jaas.spi.PropertyFileLoginModule
-
- All Implemented Interfaces:
javax.security.auth.spi.LoginModule
public class PropertyFileLoginModule extends AbstractLoginModule
PropertyFileLoginModule
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.jaas.spi.AbstractLoginModule
AbstractLoginModule.JAASUserInfo
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
_filename
private static java.util.concurrent.ConcurrentHashMap<java.lang.String,PropertyUserStore>
_propertyUserStores
private int
_refreshInterval
static java.lang.String
DEFAULT_FILENAME
private static Logger
LOG
-
Constructor Summary
Constructors Constructor Description PropertyFileLoginModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UserInfo
getUserInfo(java.lang.String userName)
void
initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map<java.lang.String,?> sharedState, java.util.Map<java.lang.String,?> options)
Read contents of the configured property file.private void
parseConfig(java.util.Map<java.lang.String,?> options)
private void
setupPropertyUserStore(java.util.Map<java.lang.String,?> options)
-
Methods inherited from class org.eclipse.jetty.jaas.spi.AbstractLoginModule
abort, commit, configureCallbacks, getCallbackHandler, getCurrentUser, getSubject, isAuthenticated, isCommitted, isIgnored, login, logout, setAuthenticated, setCallbackHandler, setCommitted, setCurrentUser, setSubject
-
-
-
-
Field Detail
-
DEFAULT_FILENAME
public static final java.lang.String DEFAULT_FILENAME
- See Also:
- Constant Field Values
-
LOG
private static final Logger LOG
-
_propertyUserStores
private static java.util.concurrent.ConcurrentHashMap<java.lang.String,PropertyUserStore> _propertyUserStores
-
_refreshInterval
private int _refreshInterval
-
_filename
private java.lang.String _filename
-
-
Method Detail
-
initialize
public void initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map<java.lang.String,?> sharedState, java.util.Map<java.lang.String,?> options)
Read contents of the configured property file.- Specified by:
initialize
in interfacejavax.security.auth.spi.LoginModule
- Overrides:
initialize
in classAbstractLoginModule
- Parameters:
subject
- the subjectcallbackHandler
- the callback handlersharedState
- the shared state mapoptions
- the options map- See Also:
LoginModule.initialize(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)
-
setupPropertyUserStore
private void setupPropertyUserStore(java.util.Map<java.lang.String,?> options)
-
parseConfig
private void parseConfig(java.util.Map<java.lang.String,?> options)
-
getUserInfo
public UserInfo getUserInfo(java.lang.String userName) throws java.lang.Exception
- Specified by:
getUserInfo
in classAbstractLoginModule
- Parameters:
userName
- the user name- Throws:
java.lang.Exception
- if unable to get the user information
-
-