|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.catalina.valves.ValveBase | +--org.apache.catalina.valves.CertificatesValve
Implementation of a Valve that deals with SSL client certificates, as follows:
The above tasks have been combined into a single Valve to minimize the amount of code that has to check for the existence of JSSE classes.
Field Summary | |
protected boolean |
certificates
Are certificates required for authentication by this web application? |
protected static org.apache.catalina.valves.CipherData[] |
ciphers
A mapping table to determine the number of effective bits in the key when using a cipher suite containing the specified cipher name. |
protected int |
debug
The debugging detail level for this component. |
protected static java.lang.String |
info
The descriptive information related to this implementation. |
protected LifecycleSupport |
lifecycle
The lifecycle event support for this component. |
protected static StringManager |
sm
The StringManager for this package. |
protected boolean |
started
Has this component been started yet? |
Fields inherited from class org.apache.catalina.valves.ValveBase |
container |
Fields inherited from interface org.apache.catalina.Lifecycle |
START_EVENT, STOP_EVENT |
Constructor Summary | |
CertificatesValve()
|
Method Summary | |
void |
addLifecycleListener(LifecycleListener listener)
Add a LifecycleEvent listener to this component. |
protected void |
expose(Request request,
Request actual)
Expose the certificate chain for this request, if there is one. |
int |
getDebug()
Return the debugging detail level for this component. |
java.lang.String |
getInfo()
Return descriptive information about this Valve implementation. |
void |
invoke(Request request,
Response response,
ValveContext context)
Expose the certificates chain if one was included on this request. |
protected void |
log(java.lang.String message)
Log a message on the Logger associated with our Container (if any). |
protected void |
log(java.lang.String message,
java.lang.Throwable throwable)
Log a message on the Logger associated with our Container (if any). |
void |
removeLifecycleListener(LifecycleListener listener)
Remove a LifecycleEvent listener from this component. |
void |
setDebug(int debug)
Set the debugging detail level for this component. |
void |
start()
Prepare for the beginning of active use of the public methods of this component. |
void |
stop()
Gracefully terminate the active use of the public methods of this component. |
protected void |
verify(Request request,
Request actual)
Verify that a client certificate chain exists if our web application is doing client certificate authentication. |
Methods inherited from class org.apache.catalina.valves.ValveBase |
getContainer, setContainer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean certificates
protected static final org.apache.catalina.valves.CipherData[] ciphers
protected int debug
protected static final java.lang.String info
protected LifecycleSupport lifecycle
protected static StringManager sm
protected boolean started
Constructor Detail |
public CertificatesValve()
Method Detail |
public int getDebug()
public void setDebug(int debug)
public java.lang.String getInfo()
public void invoke(Request request, Response response, ValveContext context) throws java.io.IOException, javax.servlet.ServletException
request
- The servlet request to be processedresponse
- The servlet response to be createdcontext
- The valve context used to invoke the next valve
in the current processing pipeline
java.io.IOException
- if an input/output error occurs
javax.servlet.ServletException
- if a servlet error occurspublic void addLifecycleListener(LifecycleListener listener)
addLifecycleListener
in interface Lifecycle
listener
- The listener to addpublic void removeLifecycleListener(LifecycleListener listener)
removeLifecycleListener
in interface Lifecycle
listener
- The listener to removepublic void start() throws LifecycleException
java.lang.IllegalStateException
- if this component has already been
started
LifecycleException
- if this component detects a fatal error
that prevents this component from being usedpublic void stop() throws LifecycleException
java.lang.IllegalStateException
- if this component has not been started
LifecycleException
- if this component detects a fatal error
that needs to be reportedprotected void expose(Request request, Request actual)
request
- The possibly wrapped Request being processedactual
- The actual underlying Request objectprotected void log(java.lang.String message)
message
- Message to be loggedprotected void log(java.lang.String message, java.lang.Throwable throwable)
message
- Message to be loggedthrowable
- Associated exceptionprotected void verify(Request request, Request actual)
request
- The possibly wrapped Request being processedactual
- The actual underlying Request object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |