Skip to content
Permalink
Browse files
[CXF-5366] DigestAuthSupplier should output the algorithm
Patch from Evgeny Shakin applied

git-svn-id: https://svn.apache.org/repos/asf/cxf/trunk@1537281 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
dkulp committed Oct 30, 2013
1 parent e01fc4a commit 2ad3aac09e0d26102ceaa2e824a0f4fb19ec80b6
Showing 1 changed file with 1 addition and 1 deletion.
@@ -144,7 +144,6 @@ synchronized String generateAuth(String uri, String username, String password) {
MessageDigest digester = MessageDigest.getInstance(digAlg);
String a1 = username + ":" + realm + ":" + password;
if ("MD5-sess".equalsIgnoreCase(algorithm)) {
algorithm = "MD5";
String tmp2 = encode(digester.digest(a1.getBytes(charset)));
a1 = tmp2 + ':' + nonce + ':' + cnonce;
}
@@ -171,6 +170,7 @@ synchronized String generateAuth(String uri, String username, String password) {
outParams.put("nc", ncstring);
outParams.put("cnonce", cnonce);
outParams.put("response", response);
outParams.put("algorithm", algorithm);
return new HttpAuthHeader(HttpAuthHeader.AUTH_TYPE_DIGEST, outParams).getFullHeader();
} catch (Exception ex) {
throw new RuntimeException(ex);

0 comments on commit 2ad3aac

Please sign in to comment.