org.apache.mina.proxy.handlers.http.basic
Class HttpBasicAuthLogicHandler

java.lang.Object
  extended by org.apache.mina.proxy.handlers.http.AbstractAuthLogicHandler
      extended by org.apache.mina.proxy.handlers.http.basic.HttpBasicAuthLogicHandler

public class HttpBasicAuthLogicHandler
extends AbstractAuthLogicHandler

HttpBasicAuthLogicHandler.java - HTTP Basic authentication mechanism logic handler.

Since:
MINA 2.0.0-M3
Author:
Apache MINA Project

Field Summary
 
Fields inherited from class org.apache.mina.proxy.handlers.http.AbstractAuthLogicHandler
proxyIoSession, request, step
 
Constructor Summary
HttpBasicAuthLogicHandler(ProxyIoSession proxyIoSession)
          
 
Method Summary
static java.lang.String createAuthorization(java.lang.String username, java.lang.String password)
          Computes the authorization header value.
 void doHandshake(IoFilter.NextFilter nextFilter)
          Method called at each step of the handshaking process.
 void handleResponse(HttpProxyResponse response)
          Handles a HTTP response from the proxy server.
 
Methods inherited from class org.apache.mina.proxy.handlers.http.AbstractAuthLogicHandler
addKeepAliveHeaders, writeRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpBasicAuthLogicHandler

public HttpBasicAuthLogicHandler(ProxyIoSession proxyIoSession)
                          throws ProxyAuthException

Throws:
ProxyAuthException
Method Detail

doHandshake

public void doHandshake(IoFilter.NextFilter nextFilter)
                 throws ProxyAuthException
Method called at each step of the handshaking process.

Specified by:
doHandshake in class AbstractAuthLogicHandler
Parameters:
nextFilter - the next filter
Throws:
ProxyAuthException

createAuthorization

public static java.lang.String createAuthorization(java.lang.String username,
                                                   java.lang.String password)
Computes the authorization header value.

Parameters:
username - the user name
password - the user password
Returns:
the authorization header value as a string

handleResponse

public void handleResponse(HttpProxyResponse response)
                    throws ProxyAuthException
Handles a HTTP response from the proxy server.

Specified by:
handleResponse in class AbstractAuthLogicHandler
Parameters:
response - The HTTP response.
Throws:
ProxyAuthException