net.spy.jwebkit.auth
Class BasicOrDigestAuthFilter

java.lang.Object
  extended by net.spy.SpyObject
      extended by net.spy.jwebkit.JWFilter
          extended by net.spy.jwebkit.auth.AuthFilter
              extended by net.spy.jwebkit.auth.BasicOrDigestAuthFilter
All Implemented Interfaces:
javax.servlet.Filter

public class BasicOrDigestAuthFilter
extends AuthFilter

AuthFilter that will use either basic or digest authentication.


Field Summary
 
Fields inherited from class net.spy.jwebkit.auth.AuthFilter
AUTH_REQ_HEADER, AUTH_RES_HEADER
 
Constructor Summary
BasicOrDigestAuthFilter()
           
 
Method Summary
protected  void doCheckedFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain)
          Run whatever authentication filters need to be attempted here.
protected  java.lang.String getAuthType()
          Get the authentication type used by this filter.
protected  BasicAuthFilter getBasicAuthFilter()
          Get a basic auth filter instance to be used
protected  DigestAuthFilter getDigestAuthFilter()
          Get the digest auth filter instance to be used.
 void init(javax.servlet.FilterConfig c)
           
 
Methods inherited from class net.spy.jwebkit.auth.AuthFilter
doAuthedChain, doFilter, getAuthAdaptor, getRequestWithPrincipal, getRequestWithPrincipal
 
Methods inherited from class net.spy.jwebkit.JWFilter
destroy, getConfig
 
Methods inherited from class net.spy.SpyObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicOrDigestAuthFilter

public BasicOrDigestAuthFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig c)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Filter
Overrides:
init in class AuthFilter
Throws:
javax.servlet.ServletException

getBasicAuthFilter

protected BasicAuthFilter getBasicAuthFilter()
Get a basic auth filter instance to be used


getDigestAuthFilter

protected DigestAuthFilter getDigestAuthFilter()
Get the digest auth filter instance to be used.


getAuthType

protected java.lang.String getAuthType()
Description copied from class: AuthFilter
Get the authentication type used by this filter.

Specified by:
getAuthType in class AuthFilter
Returns:
one of the HttpServletRequest auth types.
See Also:
HttpServletRequest

doCheckedFilter

protected void doCheckedFilter(javax.servlet.ServletRequest req,
                               javax.servlet.ServletResponse res,
                               javax.servlet.FilterChain chain)
                        throws java.io.IOException,
                               javax.servlet.ServletException
Description copied from class: AuthFilter
Run whatever authentication filters need to be attempted here. This will only be evaluated when there is no exception list.

Specified by:
doCheckedFilter in class AuthFilter
Parameters:
req - the request
res - the response
chain - the chain
Throws:
java.io.IOException - if there are errors reading or writing
javax.servlet.ServletException - if there's a general error


Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.