Class DigestUtilities
- java.lang.Object
-
- org.apache.mina.proxy.handlers.http.digest.DigestUtilities
-
public class DigestUtilities extends java.lang.ObjectDigestUtilities.java - A class supporting the HTTP DIGEST authentication (see RFC 2617).- Since:
- MINA 2.0.0-M3
-
-
Field Summary
Fields Modifier and Type Field Description private static java.security.MessageDigestmd5static java.lang.StringSESSION_HA1The Session digest attribute namestatic java.lang.String[]SUPPORTED_QOPSThe supported qualities of protections.
-
Constructor Summary
Constructors Modifier Constructor Description privateDigestUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringcomputeResponseValue(IoSession session, java.util.Map<java.lang.String,java.lang.String> map, java.lang.String method, java.lang.String pwd, java.lang.String charsetName, java.lang.String body)Computes the response to the DIGEST challenge.
-
-
-
Method Detail
-
computeResponseValue
public static java.lang.String computeResponseValue(IoSession session, java.util.Map<java.lang.String,java.lang.String> map, java.lang.String method, java.lang.String pwd, java.lang.String charsetName, java.lang.String body) throws javax.security.sasl.AuthenticationException, java.io.UnsupportedEncodingException
Computes 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:
javax.security.sasl.AuthenticationException- if we weren't able to find a directive value in the mapjava.io.UnsupportedEncodingException- 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
-
-