Package io.hawt.web.tomcat
Class TomcatUserDatabaseLoginContext
- java.lang.Object
-
- io.hawt.web.tomcat.TomcatUserDatabaseLoginContext
-
- All Implemented Interfaces:
LoginModule
public class TomcatUserDatabaseLoginContext extends Object implements LoginModule
To use Apache Tomcat's conf/tomcat-users.xml user database as JAASLoginContext, so hawtio can use that for itsAuthenticationFilter.
-
-
Field Summary
Fields Modifier and Type Field Description static StringOPTION_DIGEST_ALGORITHMstatic StringOPTION_TOMCAT_USER_LOCATION
-
Constructor Summary
Constructors Constructor Description TomcatUserDatabaseLoginContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanabort()booleancommit()protected String[]getUserPasswordRole(String username)voidinitialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)booleanlogin()booleanlogout()protected booleanpasswordsMatch(io.hawt.web.tomcat.TomcatUserDatabaseLoginContext.PasswordPair passwordPair)
-
-
-
Field Detail
-
OPTION_DIGEST_ALGORITHM
public static final String OPTION_DIGEST_ALGORITHM
- See Also:
- Constant Field Values
-
OPTION_TOMCAT_USER_LOCATION
public static final String OPTION_TOMCAT_USER_LOCATION
- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
- Specified by:
initializein interfaceLoginModule
-
login
public boolean login() throws LoginException- Specified by:
loginin interfaceLoginModule- Throws:
LoginException
-
passwordsMatch
protected boolean passwordsMatch(io.hawt.web.tomcat.TomcatUserDatabaseLoginContext.PasswordPair passwordPair)
-
commit
public boolean commit() throws LoginException- Specified by:
commitin interfaceLoginModule- Throws:
LoginException
-
abort
public boolean abort() throws LoginException- Specified by:
abortin interfaceLoginModule- Throws:
LoginException
-
logout
public boolean logout() throws LoginException- Specified by:
logoutin interfaceLoginModule- Throws:
LoginException
-
-