public AuthenticationResponse(WsCredential credential, AuthenticationChallenge challenge) { _userName = credential.UserName; _password = credential.Password; _scheme = challenge.Scheme; _realm = challenge.Realm; if (_scheme == "Digest") { initForDigest(credential, challenge); } }
private void initForDigest(WsCredential credential, AuthenticationChallenge challenge) { _nonce = challenge.Nonce; _method = "GET"; _uri = credential.Domain; _algorithm = challenge.Algorithm; _opaque = challenge.Opaque; foreach (var qop in challenge.Qop.Split(',')) { if (qop.Trim().ToLower() == "auth") { _qop = "auth"; _nc = "00000001"; break; } } _cnonce = createNonceValue(); _response = createRequestDigest(); }
public AuthenticationResponse(WsCredential credential) { _userName = credential.UserName; _password = credential.Password; _scheme = "Basic"; }