【发布时间】:2017-02-13 12:21:55
【问题描述】:
我正在尝试使用 auth0.net(用于 Auth0 API 的 .NET 客户端)进行身份验证,但是,我收到了 Auth0.Core.Exceptions.ApiException 错误,HTTP 状态代码为 NotFound (404)。
我正在使用以下代码:
var client = new AuthenticationApiClient(new Uri(Auth0Url));
var authenticationRequest = new AuthenticationRequest();
authenticationRequest.ClientId = ClientId;
authenticationRequest.Username = username;
authenticationRequest.Password = password;
authenticationRequest.Connection = "Username-Password-Authentication";
AuthenticationResponse response = null;
Task.Run(async () =>
{
response = await client.AuthenticateAsync(authenticationRequest);
}).Wait();
这里有什么问题? Management API 工作正常,ClientID 是正确的。
【问题讨论】:
-
Auth0Url变量的内容是什么?如果您不想透露,可以省略/更改域中的租户名称部分。 -
@João,这是一个非常好的问题!真丢人!它应该与用于 Management API 的不同。
标签: c# authentication auth0