public HttpBearerChallenge GetChallengeForURL(Uri url) { if (url == null) { throw new ArgumentNullException("url"); } HttpBearerChallenge value = null; lock (_cacheLock) { _cache.TryGetValue(url.FullAuthority(), out value); } return(value); }
public void SetChallengeForURL(Uri url, HttpBearerChallenge value) { if (url == null) throw new ArgumentNullException("url"); if (value == null) throw new ArgumentNullException("value"); if (string.Compare(url.FullAuthority(), value.SourceAuthority, StringComparison.OrdinalIgnoreCase) != 0) throw new ArgumentException("Source URL and Challenge URL do not match"); lock (_cacheLock) { _cache[url.FullAuthority()] = value; } }
public void SetChallengeForURL(Uri url, HttpBearerChallenge value) { if (url == null) { throw new ArgumentNullException("url"); } if (value == null) { throw new ArgumentNullException("value"); } if (string.Compare(url.FullAuthority(), value.SourceAuthority, StringComparison.OrdinalIgnoreCase) != 0) { throw new ArgumentException("Source URL and Challenge URL do not match"); } lock (_cacheLock) { _cache[url.FullAuthority()] = value; } }