br.gov.frameworkdemoiselle.security
Class AbstractHTTPAuthorizationFilter

java.lang.Object
  extended by br.gov.frameworkdemoiselle.security.AbstractHTTPAuthorizationFilter
All Implemented Interfaces:
javax.servlet.Filter
Direct Known Subclasses:
BasicAuthFilter, TokenAuthFilter

public abstract class AbstractHTTPAuthorizationFilter
extends Object
implements javax.servlet.Filter


Constructor Summary
AbstractHTTPAuthorizationFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
           
protected static String extractCredentials(String type, String authHeader)
           
 void init(javax.servlet.FilterConfig filterConfig)
           
protected abstract  boolean isActive(RESTSecurityConfig config)
           
protected abstract  boolean isSupported(String authHeader)
           
protected abstract  void prepareForLogin()
           
protected abstract  void prepareForLogout()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHTTPAuthorizationFilter

public AbstractHTTPAuthorizationFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Filter

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain chain)
              throws IOException,
                     javax.servlet.ServletException
Specified by:
doFilter in interface javax.servlet.Filter
Throws:
IOException
javax.servlet.ServletException

isSupported

protected abstract boolean isSupported(String authHeader)

isActive

protected abstract boolean isActive(RESTSecurityConfig config)

prepareForLogin

protected abstract void prepareForLogin()

prepareForLogout

protected abstract void prepareForLogout()

extractCredentials

protected static String extractCredentials(String type,
                                           String authHeader)
                                    throws InvalidCredentialsException
Throws:
InvalidCredentialsException


Copyright © 2014 SERPRO - Serviço Federal de Processamento de Dados. All Rights Reserved.