Package io.hawt.system
Class JaasAuthenticator
- java.lang.Object
-
- io.hawt.system.AbstractAuthenticator
-
- io.hawt.system.JaasAuthenticator
-
- All Implemented Interfaces:
Authenticator
public class JaasAuthenticator extends AbstractAuthenticator
Authenticator performs authentication using JAAS with theLoginContextfor the chosen realm. Authenticator supports the following authentication methods:- a set of user name and password
- client certificates
-
-
Field Summary
-
Fields inherited from class io.hawt.system.AbstractAuthenticator
authConfiguration, certificates, password, request, username
-
-
Constructor Summary
Constructors Constructor Description JaasAuthenticator(javax.servlet.http.HttpServletRequest request, AuthenticationConfiguration authConfiguration)Request-based authenticator such as when authenticating direct Jolokia accesses.JaasAuthenticator(javax.servlet.http.HttpServletRequest request, AuthenticationConfiguration authConfiguration, String username, String password)Explicit username/password authenticator when authenticating users from login page.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckRoles(Subject subject, String role, String rolePrincipalClasses)protected SubjectdoAuthenticate()protected voidlogin(Subject subject, String realm, Configuration configuration)voidlogout(AuthenticationConfiguration authConfiguration, Subject subject)-
Methods inherited from class io.hawt.system.AbstractAuthenticator
authenticate, hasNoCredentials, initSubject, isUsernamePasswordSet
-
-
-
-
Constructor Detail
-
JaasAuthenticator
public JaasAuthenticator(javax.servlet.http.HttpServletRequest request, AuthenticationConfiguration authConfiguration, String username, String password)Explicit username/password authenticator when authenticating users from login page.
-
JaasAuthenticator
public JaasAuthenticator(javax.servlet.http.HttpServletRequest request, AuthenticationConfiguration authConfiguration)Request-based authenticator such as when authenticating direct Jolokia accesses.
-
-
Method Detail
-
doAuthenticate
protected Subject doAuthenticate()
- Specified by:
doAuthenticatein classAbstractAuthenticator
-
login
protected void login(Subject subject, String realm, Configuration configuration) throws LoginException
- Throws:
LoginException
-
logout
public void logout(AuthenticationConfiguration authConfiguration, Subject subject)
-
-