我已经成功地为asp.net web API使用了承载令牌认证,如默认的单页面应用程序模板中所示.但现在我想从不同的站点(不同的URL)使用相同的Web API.
当我从不同的站点向web API AuthorizeEndpoint(默认/ api / Account / ExternalLogin)发出请求时,出现错误:invalid_request.我想问题出在redirect_uri值中,因为将其更改为与web api在同一域上运行的站点的值可以解决问题.
应用程序OAuthAuthorizationServerProvider中的ValidateClientRedirectUri方法不会被触发.因此,根据我在Katana源中的搜索,错误来源位于OAuthAuthorizationServerHandler.InvokeAuthorizeEndpointAsync中.
有没有其他人有同样的问题或我做错了什么?
解决方法
Katana OAuth中间件并非设计为交叉应用程序 – 它主要用于将OAuth授权服务器“嵌入”到业务资源中.
如果你想要一个合适的(免费)授权服务器 – 看看这里:
https://github.com/thinktecture/Thinktecture.AuthorizationServer/wiki
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。