View Javadoc
1   package org.littleshoot.proxy;
2   
3   import org.jboss.netty.channel.ChannelHandlerContext;
4   import org.jboss.netty.handler.codec.http.HttpRequest;
5   
6   /***
7    * Interface for classes that manage proxy authentication.
8    */
9   public interface ProxyAuthorizationManager {
10  
11      /***
12       * Adds the specified {@link ProxyAuthorizationHandler}.
13       * 
14       * @param pah The {@link ProxyAuthorizationHandler} to add.
15       */
16      void addHandler(ProxyAuthorizationHandler pah);
17  
18      /***
19       * Handles all aspects of authorizing the specified request, looping
20       * through all registered {@link ProxyAuthorizationHandler}s.
21       * 
22       * @param httpRequest The HTTP request.
23       * @param ctx The context, including the underlying channel.
24       * @return <code>true</code> if authorization succeeded, otherwise 
25       * <code>false</code>.
26       */
27      boolean handleProxyAuthorization(HttpRequest httpRequest,
28          ChannelHandlerContext ctx);
29  
30  }