Skip to content

Commit

Permalink
use set instead of add for dictionary in tokenAcquisition (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
jennyf19 authored Jun 24, 2020
1 parent 47a5856 commit 98b08a9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Microsoft.Identity.Web/TokenAcquisition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -540,12 +540,8 @@ public void ReplyForbiddenWithWwwAuthenticateHeader(IEnumerable<string> scopes,
var httpResponse = CurrentHttpContext.Response;
var headers = httpResponse.Headers;
httpResponse.StatusCode = (int)HttpStatusCode.Forbidden;
if (headers.ContainsKey(HeaderNames.WWWAuthenticate))
{
headers.Remove(HeaderNames.WWWAuthenticate);
}

headers.Add(HeaderNames.WWWAuthenticate, v);
headers[HeaderNames.WWWAuthenticate] = v;
}

private static bool AcceptedTokenVersionMismatch(MsalUiRequiredException msalSeviceException)
Expand Down

0 comments on commit 98b08a9

Please sign in to comment.