Class DigestUtilities
java.lang.Object
org.apache.mina.proxy.handlers.http.digest.DigestUtilities
DigestUtilities.java - A class supporting the HTTP DIGEST authentication (see RFC 2617).
- Since:
- MINA 2.0.0-M3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static MessageDigeststatic final StringThe Session digest attribute namestatic final String[]The supported qualities of protections. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
SESSION_HA1
The Session digest attribute name -
md5
-
SUPPORTED_QOPS
The supported qualities of protections.
-
-
Constructor Details
-
DigestUtilities
private DigestUtilities()
-
-
Method Details
-
computeResponseValue
public static String computeResponseValue(IoSession session, Map<String, String> map, String method, String pwd, String charsetName, String body) throws AuthenticationException, UnsupportedEncodingExceptionComputes the response to the DIGEST challenge.- Parameters:
session- the current sessionmap- the map holding the directives sent by the proxymethod- the HTTP verbpwd- the passwordcharsetName- the name of the charset used for the challengebody- the html body to be hashed for integrity calculations- Returns:
- The response
- Throws:
AuthenticationException- if we weren't able to find a directive value in the mapUnsupportedEncodingException- If we weren't able to encode to ISO 8859_1 the username or realm, or if we weren't able to encode the charsetName
-