Package io.hawt.web.tomcat
Class TomcatUserDatabaseLoginContext
java.lang.Object
io.hawt.web.tomcat.TomcatUserDatabaseLoginContext
- All Implemented Interfaces:
LoginModule
To use Apache Tomcat's conf/tomcat-users.xml user database as JAAS
LoginContext,
so hawtio can use that for its AuthenticationFilter.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanabort()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 Details
-
OPTION_DIGEST_ALGORITHM
- See Also:
-
OPTION_TOMCAT_USER_LOCATION
- See Also:
-
-
Constructor Details
-
TomcatUserDatabaseLoginContext
public TomcatUserDatabaseLoginContext()
-
-
Method Details
-
initialize
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) - Specified by:
initializein interfaceLoginModule
-
login
- Specified by:
loginin interfaceLoginModule- Throws:
LoginException
-
passwordsMatch
protected boolean passwordsMatch(io.hawt.web.tomcat.TomcatUserDatabaseLoginContext.PasswordPair passwordPair) -
commit
public boolean commit()- Specified by:
commitin interfaceLoginModule
-
abort
public boolean abort()- Specified by:
abortin interfaceLoginModule
-
logout
- Specified by:
logoutin interfaceLoginModule- Throws:
LoginException
-
getUserPasswordRole
- Throws:
Exception
-