【发布时间】:2016-11-16 10:35:31
【问题描述】:
我有一个具有隐式流程的客户端配置。
new Client
{
Enabled = true,
ClientId = "implicit",
ClientName = "Implicit Grant Flow",
Flow = Flows.Implicit,
RedirectUris = new List<string>
{
"http://localhost:24678/callback.html",
},
AllowedScopes = new List<string>
{
Constants.StandardScopes.OpenId
}
}
我想将我的 javascript 客户端重定向到 IdentityServer3 登录页面。
var url = "http://localhost:4751/connect/authorize"
+ "?client_id=" + ("implicit")
+ "&redirect_uri=" + encodeURIComponent("http://localhost:24678/callback.html")
+ "&response_type=" + ("token")
+ "&response_mode=" + ("form_post")
+ "&scope=" + ("openid");
但是发生了错误:
HTTP 错误 405.0 - 方法不允许
【问题讨论】:
-
如果您在服务器端开启日志记录,很可能会显示答案。
标签: javascript oauth-2.0 identityserver3