我有一個隱式流程的客戶端配置。IdentityServer3隱式流程未啓用javascript
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 clint重定向到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 - 不允許的方法
如果您打開日誌記錄在服務器上答案很可能會被揭示。 – GlennSills