public class DeferredAuthentication extends java.lang.Object implements Authentication.Deferred
Authentication.Challenge, Authentication.Deferred, Authentication.Failed, Authentication.Failure, Authentication.LoginAuthentication, Authentication.LogoutAuthentication, Authentication.NonAuthenticated, Authentication.ResponseSent, Authentication.SendSuccess, Authentication.User, Authentication.Wrapped
Modifier and Type | Field and Description |
---|---|
(package private) static javax.servlet.http.HttpServletResponse |
__deferredResponse |
private static javax.servlet.ServletOutputStream |
__nullOut |
protected LoginAuthenticator |
_authenticator |
private java.lang.Object |
_previousAssociation |
private static Logger |
LOG |
NOT_CHECKED, SEND_CONTINUE, SEND_FAILURE, SEND_SUCCESS, UNAUTHENTICATED
Constructor and Description |
---|
DeferredAuthentication(LoginAuthenticator authenticator) |
Modifier and Type | Method and Description |
---|---|
Authentication |
authenticate(javax.servlet.ServletRequest request)
Authenticate if possible without sending a challenge.
|
Authentication |
authenticate(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
Authenticate and possibly send a challenge.
|
java.lang.Object |
getPreviousAssociation() |
static boolean |
isDeferred(javax.servlet.http.HttpServletResponse response) |
Authentication |
login(java.lang.String username,
java.lang.Object password,
javax.servlet.ServletRequest request)
Login with the LOGIN authenticator
|
Authentication |
logout(javax.servlet.ServletRequest request)
Remove any user information that may be present in the request
such that a call to getUserPrincipal/getRemoteUser will return null.
|
private static final Logger LOG
protected final LoginAuthenticator _authenticator
private java.lang.Object _previousAssociation
static final javax.servlet.http.HttpServletResponse __deferredResponse
private static javax.servlet.ServletOutputStream __nullOut
public DeferredAuthentication(LoginAuthenticator authenticator)
public Authentication authenticate(javax.servlet.ServletRequest request)
Authentication.Deferred
authenticate
in interface Authentication.Deferred
request
- the requestAuthentication.Deferred.authenticate(ServletRequest)
public Authentication authenticate(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
Authentication.Deferred
authenticate
in interface Authentication.Deferred
request
- the requestresponse
- the responseAuthentication.Deferred.authenticate(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
public Authentication login(java.lang.String username, java.lang.Object password, javax.servlet.ServletRequest request)
Authentication.LoginAuthentication
login
in interface Authentication.LoginAuthentication
username
- the usernamepassword
- the passwordrequest
- the requestAuthentication.LoginAuthentication.login(String, Object, ServletRequest)
public Authentication logout(javax.servlet.ServletRequest request)
Authentication.LogoutAuthentication
logout
in interface Authentication.LogoutAuthentication
request
- the requestpublic java.lang.Object getPreviousAssociation()
public static boolean isDeferred(javax.servlet.http.HttpServletResponse response)
response
- the responseauthenticate(ServletRequest)