org.apache.tomcat.modules.aaa
Class CredentialsInterceptor
java.lang.Object
|
+--org.apache.tomcat.core.BaseInterceptor
|
+--org.apache.tomcat.modules.aaa.CredentialsInterceptor
- public class CredentialsInterceptor
- extends BaseInterceptor
Extract user/password credentials from a request.
This module is specialized in detecting BASIC and FORM authentication, and
will set 2 notes in the request: "credentials.user" and
"credentials.password".
A "Realm" module may use the 2 notes in authenticating the user.
This module must will act on the "authenticate" callback - the action
will happen _only_ for requests requiring authentication, not for
every request.
It must be configured before the Realm module.
Field Summary |
static java.lang.String |
PASSWORD_NOTE
The module will set a note with this name on the request for
the extracted password, if Basic or Form authentication is used |
static java.lang.String |
USER_NOTE
The module will set a note with this name on the request for
the extracted user, if Basic or Form authentication is used |
Methods inherited from class org.apache.tomcat.core.BaseInterceptor |
addContainer, addContext, addHandler, addInterceptor, addSecurityConstraint, afterBody, authorize, beforeBody, beforeCommit, contextInit, contextMap, contextShutdown, contextState, engineShutdown, engineStart, engineState, engineStop, findSession, getContext, getContextManager, getDebug, getInfo, getLog, getNote, getNote, handleError, log, log, log, log, postReadRequest, postRequest, postService, postServletDestroy, postServletInit, preService, preServletDestroy, preServletInit, registerHooks, reload, removeContainer, removeContext, removeHandler, removeInterceptor, requestMap, sessionState, setContext, setContextManager, setDebug, setInfo, setNote, setNote |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
USER_NOTE
public static final java.lang.String USER_NOTE
- The module will set a note with this name on the request for
the extracted user, if Basic or Form authentication is used
PASSWORD_NOTE
public static final java.lang.String PASSWORD_NOTE
- The module will set a note with this name on the request for
the extracted password, if Basic or Form authentication is used
CredentialsInterceptor
public CredentialsInterceptor()
engineInit
public void engineInit(ContextManager cm)
throws TomcatException
- Description copied from class:
BaseInterceptor
- Initialize the module.
- Overrides:
engineInit
in class BaseInterceptor
- Following copied from class:
org.apache.tomcat.core.BaseInterceptor
- Throws:
TomcatException
- The module will not be added if any
exception is thrown by engineInit.
authenticate
public int authenticate(Request req,
Response res)
- Extract the credentails from req
- Overrides:
authenticate
in class BaseInterceptor
Copyright © 2001 Apache Software Foundation. All Rights Reserved.