问题描述
我很抱歉我的英语不好。
I am sorry for my bad English.
我正在使用Microsoft.Owin.Security.OAuth库进行身份验证。通过这种方式,我生成令牌。
I am using the Microsoft.Owin.Security.OAuth library to authenticate. In this way, I produce token.
public partial class Startup
{
public static OAuthAuthorizationServerOptions OAuthOptions { get; private set; }
static Startup()
{
OAuthOptions = new OAuthAuthorizationServerOptions
{
TokenEndpointPath = new PathString("/token"),
Provider = new OAuthAppProvider(),
AccessTokenExpireTimeSpan = TimeSpan.FromDays(2),
AllowInsecureHttp = true
};
}
}
Localhost没有问题。如果我发送到http:// localhost:??? / token的用户名和密码是正确的,则会创建一个令牌。如果他错了,他会回答我没有被授权。
There is no problem with Localhost. A token is created if the username and password that I send to http://localhost:???/token is correct. If he's wrong, he'll answer that I'm not authorized.
但是,我在Azure中发布项目时遇到了麻烦。我创建的操作正在运行。但是创建令牌的页面(http:// {appName} .azurewebsites.net / token)表示 "您要查找的资源已被删除,其
名称已更改,或暂时不可用。"
However, I'm having trouble publishing the project in Azure. The actions I created is running. But the page that created the token (http://{appName}.azurewebsites.net/token) said "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
可能是什么问题?
我希望我说得对。谢谢。
I hope I pronounced it correctly. Thanks.
FurkanKaraçalı
Furkan Karaçalı
推荐答案
这篇关于使用Microsoft.Owin.Security.OAuth创建令牌的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!