rabbit.filter
Class ProxyAuth

java.lang.Object
  extended by rabbit.filter.ProxyAuth
All Implemented Interfaces:
HttpFilter

public class ProxyAuth
extends Object
implements HttpFilter

This is a filter that requires users to use proxy-authentication.

Author:
Robert Olofsson

Constructor Summary
ProxyAuth()
           
 
Method Summary
 HttpHeader doConnectFiltering(SocketChannel socket, HttpHeader header, Connection con)
          Test if a socket/header combination is valid or return a new HttpHeader.
 HttpHeader doHttpInFiltering(SocketChannel socket, HttpHeader header, Connection con)
          Check that the user has been authenticated..
 HttpHeader doHttpOutFiltering(SocketChannel socket, HttpHeader header, Connection con)
          Test if a socket/header combination is valid or return a new HttpHeader.
 void setup(SProperties properties, HttpProxy proxy)
          Setup this class with the given properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyAuth

public ProxyAuth()
Method Detail

doHttpInFiltering

public HttpHeader doHttpInFiltering(SocketChannel socket,
                                    HttpHeader header,
                                    Connection con)
Check that the user has been authenticated..

Specified by:
doHttpInFiltering in interface HttpFilter
Parameters:
socket - the SocketChannel that made the request.
header - the actual request made.
con - the Connection handling the request.
Returns:
null if everything is fine or a HttpHeader describing the error (a 407).

doHttpOutFiltering

public HttpHeader doHttpOutFiltering(SocketChannel socket,
                                     HttpHeader header,
                                     Connection con)
Description copied from interface: HttpFilter
Test if a socket/header combination is valid or return a new HttpHeader.

Specified by:
doHttpOutFiltering in interface HttpFilter
Parameters:
socket - the Socket that made the request.
header - the actual request made.
con - the Connection handling the request.
Returns:
null if everything is fine or a HTTPHeader describing the error (like a 403).

doConnectFiltering

public HttpHeader doConnectFiltering(SocketChannel socket,
                                     HttpHeader header,
                                     Connection con)
Description copied from interface: HttpFilter
Test if a socket/header combination is valid or return a new HttpHeader.

Specified by:
doConnectFiltering in interface HttpFilter
Parameters:
socket - the Socket that made the request.
header - the actual request made.
con - the Connection handling the request.
Returns:
null if everything is fine or a HTTPHeader describing the error (like a 403).

setup

public void setup(SProperties properties,
                  HttpProxy proxy)
Setup this class with the given properties.

Specified by:
setup in interface HttpFilter
Parameters:
properties - the new configuration of this class.
proxy - the HttpProxy that is using this filter