Skip to content

[Authentication]405 Method not allowed #27

@saber-wang

Description

@saber-wang

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions