com.dyuproject.openid
Class OpenIdServletFilter

java.lang.Object
  extended by com.dyuproject.openid.OpenIdServletFilter
All Implemented Interfaces:
Filter

public class OpenIdServletFilter
extends Object
implements Filter

An openid servlet filter that can work with hardly any configuration. The only thing required is the init-parameter "forwardUri".

Author:
David Yu

Field Summary
protected  String _defaultErrorMsg
           
protected  String _forwardUri
           
protected  String _idNotFoundMsg
           
protected  RelyingParty _relyingParty
           
static String DEFAULT_ERROR_MSG
           
static String ERROR_MSG_ATTR
           
static String ID_NOT_FOUND_MSG
           
 
Constructor Summary
OpenIdServletFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
           
 String getForwardUri()
           
 RelyingParty getRelyingParty()
           
 boolean handle(HttpServletRequest request, HttpServletResponse response)
           
 void init(FilterConfig config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_MSG_ATTR

public static final String ERROR_MSG_ATTR
See Also:
Constant Field Values

DEFAULT_ERROR_MSG

public static final String DEFAULT_ERROR_MSG
See Also:
Constant Field Values

ID_NOT_FOUND_MSG

public static final String ID_NOT_FOUND_MSG
See Also:
Constant Field Values

_forwardUri

protected String _forwardUri

_relyingParty

protected RelyingParty _relyingParty

_defaultErrorMsg

protected String _defaultErrorMsg

_idNotFoundMsg

protected String _idNotFoundMsg
Constructor Detail

OpenIdServletFilter

public OpenIdServletFilter()
Method Detail

init

public void init(FilterConfig config)
          throws ServletException
Specified by:
init in interface Filter
Throws:
ServletException

getForwardUri

public String getForwardUri()

getRelyingParty

public RelyingParty getRelyingParty()

doFilter

public void doFilter(ServletRequest req,
                     ServletResponse res,
                     FilterChain chain)
              throws IOException,
                     ServletException
Specified by:
doFilter in interface Filter
Throws:
IOException
ServletException

destroy

public void destroy()
Specified by:
destroy in interface Filter

handle

public boolean handle(HttpServletRequest request,
                      HttpServletResponse response)
               throws IOException,
                      ServletException
Throws:
IOException
ServletException


Copyright © 2013. All Rights Reserved.