public Builder parseWWWAuthenticateHeader(String headerLine) { setRealmName(match(headerLine, "realm")) .setNonce(match(headerLine, "nonce")) .setOpaque(match(headerLine, "opaque")) .setScheme(isNonEmpty(nonce) ? AuthScheme.DIGEST : AuthScheme.BASIC); String algorithm = match(headerLine, "algorithm"); if (isNonEmpty(algorithm)) { setAlgorithm(algorithm); } // FIXME qop is different with proxy? String rawQop = match(headerLine, "qop"); if (rawQop != null) { setQop(parseRawQop(rawQop)); } return this; }
public Builder parseProxyAuthenticateHeader(String headerLine) { setRealmName(match(headerLine, "realm")) .setNonce(match(headerLine, "nonce")) .setOpaque(match(headerLine, "opaque")) .setScheme(isNonEmpty(nonce) ? AuthScheme.DIGEST : AuthScheme.BASIC); String algorithm = match(headerLine, "algorithm"); if (isNonEmpty(algorithm)) { setAlgorithm(algorithm); } // FIXME qop is different with proxy? setQop(match(headerLine, "qop")); return this; }