public class HTTPFormServerAuthModule extends WebServerAuthModule
This class implements a JASPI ServerAuthModule
that handles HTTP FORM authentication.
Modifier and Type | Field and Description |
---|---|
protected boolean |
cache |
protected org.apache.catalina.Context |
context |
protected String |
delegatingLoginContextName |
protected static org.apache.catalina.util.StringManager |
sm |
callbackHandler, options
Constructor and Description |
---|
HTTPFormServerAuthModule()
Creates an instance of
HTTPFormServerAuthModule . |
HTTPFormServerAuthModule(String delegatingLoginContextName)
Creates an instance of
HTTPFormServerAuthModule with the specified delegating login context name. |
Modifier and Type | Method and Description |
---|---|
protected void |
forwardToErrorPage(org.apache.catalina.connector.Request request,
org.apache.catalina.connector.Response response,
org.apache.catalina.deploy.LoginConfig config)
Forwards the current request to the error page.
|
protected void |
forwardToLoginPage(org.apache.catalina.connector.Request request,
org.apache.catalina.connector.Response response,
org.apache.catalina.deploy.LoginConfig config)
Forwards the current request to the login page.
|
protected boolean |
matchRequest(org.apache.catalina.connector.Request request)
This method verifies if the specified
Request matches a previously saved request or not. |
protected boolean |
restoreRequest(org.apache.catalina.connector.Request request,
org.apache.catalina.Session session)
Restores the original request from information stored in our session.
|
protected String |
savedRequestURL(org.apache.catalina.Session session)
Returns the request URI (with the corresponding query string, if any) from the saved request so that we can
redirect to it.
|
protected void |
saveRequest(org.apache.catalina.connector.Request request,
org.apache.catalina.Session session)
Saves the original request information into our session.
|
javax.security.auth.message.AuthStatus |
secureResponse(javax.security.auth.message.MessageInfo messageInfo,
Subject serviceSubject) |
javax.security.auth.message.AuthStatus |
validateRequest(javax.security.auth.message.MessageInfo messageInfo,
Subject clientSubject,
Subject serviceSubject) |
cleanSubject, getSupportedMessageTypes, initialize, registerWithCallbackHandler
protected org.apache.catalina.Context context
protected boolean cache
protected static final org.apache.catalina.util.StringManager sm
protected String delegatingLoginContextName
public HTTPFormServerAuthModule()
Creates an instance of HTTPFormServerAuthModule
.
public HTTPFormServerAuthModule(String delegatingLoginContextName)
Creates an instance of HTTPFormServerAuthModule
with the specified delegating login context name.
delegatingLoginContextName
- the name of the login context configuration that contains the JAAS modules that
are to be called by this module.public javax.security.auth.message.AuthStatus secureResponse(javax.security.auth.message.MessageInfo messageInfo, Subject serviceSubject) throws javax.security.auth.message.AuthException
secureResponse
in interface javax.security.auth.message.ServerAuth
secureResponse
in class WebServerAuthModule
javax.security.auth.message.AuthException
public javax.security.auth.message.AuthStatus validateRequest(javax.security.auth.message.MessageInfo messageInfo, Subject clientSubject, Subject serviceSubject) throws javax.security.auth.message.AuthException
validateRequest
in interface javax.security.auth.message.ServerAuth
validateRequest
in class WebServerAuthModule
javax.security.auth.message.AuthException
protected boolean matchRequest(org.apache.catalina.connector.Request request)
This method verifies if the specified Request
matches a previously saved request or not.
request
- The Request
object to be verified.true
if the request matches the saved one; false
otherwise.protected boolean restoreRequest(org.apache.catalina.connector.Request request, org.apache.catalina.Session session)
Restores the original request from information stored in our session. If the original request is no longer present
(because the session timed out), return false
; otherwise, return true
.
request
- the Request
instance that will be populated with the saved request data.session
- the Session
containing the saved information.true
if the request could be restored; false
otherwise.protected void saveRequest(org.apache.catalina.connector.Request request, org.apache.catalina.Session session) throws IOException
Saves the original request information into our session.
request
- the Request
instance to be savedsession
- the Session
where the request is to be saved.IOException
- if an error occurs while saving the request.protected String savedRequestURL(org.apache.catalina.Session session)
Returns the request URI (with the corresponding query string, if any) from the saved request so that we can redirect to it.
session
- the current Session
.String
containing the request URI.protected void forwardToLoginPage(org.apache.catalina.connector.Request request, org.apache.catalina.connector.Response response, org.apache.catalina.deploy.LoginConfig config)
Forwards the current request to the login page.
request
- the Request
instance being processed.response
- the Response
instance being processed.config
- the login configuration describing how authentication should be performedprotected void forwardToErrorPage(org.apache.catalina.connector.Request request, org.apache.catalina.connector.Response response, org.apache.catalina.deploy.LoginConfig config)
Forwards the current request to the error page.
request
- the Request
instance being processed.response
- the Response
instance being processed.config
- the login configuration describing how authentication should be performedCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.