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

MSAL claims based authentication not supported #60

Open
Cpt-Falcon opened this issue Aug 18, 2020 · 1 comment
Open

MSAL claims based authentication not supported #60

Cpt-Falcon opened this issue Aug 18, 2020 · 1 comment
Labels

Comments

@Cpt-Falcon
Copy link

In the web client params, we should be able to pass an AuthenticationHeaderValue to support MSAL, for example the following from the Microsoft MSAL tutorial

            httpClient.DefaultRequestHeaders.Authorization =
                new AuthenticationHeaderValue(Constants.BearerAuthorizationScheme,
                                              accessToken);

Currently this Web DAV Client does not support Microsoft sharepoint since I can't pass the needed access token as part of the header. I might add this in myself if it would be desired.

@skazantsev
Copy link
Owner

Hi @serp777 ,
It's possible to pass a custom HttpClient instance when creating WebDavClient.

WebDavClient CreateClientWithAuth(string accessToken)
{
    var httpClient = new HttpClient();
    httpClient.DefaultRequestHeaders.Authorization =
        new AuthenticationHeaderValue("Bearer", accessToken);
    return new WebDavClient(httpClient);
}

I hope it solves it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants