Class HttpBasicAuthLogicHandler
- java.lang.Object
-
- org.apache.mina.proxy.handlers.http.AbstractAuthLogicHandler
-
- 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
Constructors Constructor Description HttpBasicAuthLogicHandler(ProxyIoSession proxyIoSession)
Build an HttpBasicAuthLogicHandler
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
createAuthorization(String username, 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
-
-
-
-
Constructor Detail
-
HttpBasicAuthLogicHandler
public HttpBasicAuthLogicHandler(ProxyIoSession proxyIoSession) throws ProxyAuthException
Build an HttpBasicAuthLogicHandler- Parameters:
proxyIoSession
- The proxy session- Throws:
ProxyAuthException
- If we had a probelm during the proxy authentication
-
-
Method Detail
-
doHandshake
public void doHandshake(IoFilter.NextFilter nextFilter) throws ProxyAuthException
Method called at each step of the handshaking process.- Specified by:
doHandshake
in classAbstractAuthLogicHandler
- Parameters:
nextFilter
- the next filter- Throws:
ProxyAuthException
- If we get an error during the proxy authentication
-
createAuthorization
public static String createAuthorization(String username, String password)
Computes the authorization header value.- Parameters:
username
- the user namepassword
- 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 classAbstractAuthLogicHandler
- Parameters:
response
- The HTTP response.- Throws:
ProxyAuthException
- If we get an error during the proxy authentication
-
-