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

[Authentication]405 Method not allowed #27

Open
saber-wang opened this issue Mar 3, 2023 · 1 comment
Open

[Authentication]405 Method not allowed #27

saber-wang opened this issue Mar 3, 2023 · 1 comment

Comments

@saber-wang
Copy link
Contributor

saber-wang commented Mar 3, 2023

Due to the change of #13 , the authentication of OAuthClient is interrupted and the authentication mode of

var queryString = new QueryString();
queryString.AddIfNotEmpty("service", service);
queryString.AddIfNotEmpty("scope", scope);
var builder = new UriBuilder(new Uri(realm))
{
Query = queryString.GetQueryString()
};
var request = new HttpRequestMessage(HttpMethod.Get, builder.Uri);
if (username != null && password != null)
{
// https://gist.github.com/jlhawn/8f218e7c0b14c941c41f
var bytes = Encoding.UTF8.GetBytes($"{username}:{password}");
var parameter = Convert.ToBase64String(bytes);
request.Headers.Authorization = new AuthenticationHeaderValue("Basic", parameter);
}
is missing

@Jaben
Copy link
Member

Jaben commented Mar 3, 2023

A PR would be ideal as I don't have a lot of ways to test this system.

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

No branches or pull requests

2 participants