public class FormAuthenticator extends AuthenticatorBase
Modifier and Type | Field and Description |
---|---|
protected static String |
info
Descriptive information about this implementation.
|
alwaysUseSession, AUTH_HEADER_NAME, cache, changeSessionIdOnAuthentication, context, disableProxyCaching, entropy, random, randomClass, REALM_NAME, securePagesWithPragma, SESSION_ID_BYTES, sso
container, controller, debug, domain, lifecycle, log, next, oname, rb, started
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_EVENT, START_EVENT, STOP_EVENT
END_PIPELINE, INVOKE_NEXT
Constructor and Description |
---|
FormAuthenticator() |
Modifier and Type | Method and Description |
---|---|
boolean |
authenticate(HttpRequest request,
HttpResponse response,
LoginConfig config)
Authenticate the user making this request, based on the specified login configuration.
|
protected void |
forwardToErrorPage(HttpRequest request,
HttpResponse response,
LoginConfig config)
Called to forward to the error page.
|
protected void |
forwardToLoginPage(HttpRequest request,
HttpResponse response,
LoginConfig config)
Called to forward to the login page.
|
protected String |
getAuthMethod() |
String |
getInfo()
Return descriptive information about this Valve implementation.
|
protected boolean |
matchRequest(HttpRequest request)
Does this request match the saved one (so that it must be the redirect we signaled after successful authentication?
|
protected boolean |
restoreRequest(HttpRequest request,
Session session)
Restore the original request from information stored in our session.
|
protected String |
savedRequestURL(Session session)
Return the request URI (with the corresponding query string, if any) from the saved request so that we can redirect
to it.
|
protected void |
saveRequest(HttpRequest request,
Session session)
Save the original request information into our session.
|
associate, doLogin, generateSessionId, getAlwaysUseSession, getCache, getContainer, getDebug, getDisableProxyCaching, getEntropy, getRandom, getRandomClass, getRealmName, getSession, getSession, getSingleSignOn, invoke, isChangeSessionIdOnAuthentication, isSecurePagesWithPragma, log, log, login, logout, postInvoke, register, setAlwaysUseSession, setCache, setChangeSessionIdOnAuthentication, setContainer, setDebug, setDisableProxyCaching, setEntropy, setRandomClass, setRealmName, setSecurePagesWithPragma, setSingleSignOn, start, stop
addLifecycleListener, backgroundProcess, createObjectName, event, findLifecycleListeners, getController, getDomain, getNext, getObjectName, getParentName, invoke, isStarted, removeLifecycleListener, setController, setNext, setObjectName
protected static final String info
public String getInfo()
getInfo
in interface Valve
getInfo
in interface GlassFishValve
getInfo
in class AuthenticatorBase
public boolean authenticate(HttpRequest request, HttpResponse response, LoginConfig config) throws IOException
true
if
any specified constraint has been satisfied, or false
if we have created a response challenge already.authenticate
in class AuthenticatorBase
request
- Request we are processingresponse
- Response we are creatingconfig
- Login configuration describing how authentication should be performedIOException
- if an input/output error occursprotected String getAuthMethod()
getAuthMethod
in class AuthenticatorBase
protected boolean matchRequest(HttpRequest request)
request
- The request to be verifiedprotected boolean restoreRequest(HttpRequest request, Session session) throws IOException
false
; otherwise, return true
.request
- The request to be restoredsession
- The session containing the saved informationIOException
protected void forwardToLoginPage(HttpRequest request, HttpResponse response, LoginConfig config)
request
- HttpRequest we are processingresponse
- HttpResponse we are creatingconfig
- Login configuration describing how authentication should be performedprotected void forwardToErrorPage(HttpRequest request, HttpResponse response, LoginConfig config)
request
- HttpRequest we are processingresponse
- HttpResponse we are creatingconfig
- Login configuration describing how authentication should be performedprotected void saveRequest(HttpRequest request, Session session) throws IOException
request
- The request to be savedsession
- The session to contain the saved informationIOException
Copyright © 2020. All rights reserved.