Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Don't use ].DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken) in samples/templates #350

Closed
jmprieur opened this issue Jul 22, 2020 · 1 comment
Assignees
Labels
bug Something isn't working fixed P1

Comments

@jmprieur
Copy link
Collaborator

jmprieur commented Jul 22, 2020

In the templates and dev samples, don't use

[httpClient].DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);

but rather create a HttpRequestMessage and add the header tot he request.

https://github.com/AzureAD/microsoft-identity-web/search?q=DefaultRequestHeaders.Authorization&unscoped_q=DefaultRequestHeaders.Authorization

@jmprieur jmprieur added bug Something isn't working P1 labels Jul 22, 2020
@jmprieur jmprieur added this to the [2] .NET5 preview 8 milestone Jul 22, 2020
@jennyf19 jennyf19 self-assigned this Jul 22, 2020
@pmaytak
Copy link
Contributor

pmaytak commented Jul 25, 2020

@pmaytak pmaytak closed this as completed Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed P1
Projects
None yet
Development

No branches or pull requests

3 participants