【发布时间】:2020-03-26 14:30:21
【问题描述】:
我正在尝试在 .Net core 3.1 中实现 IdentityServer4
我在调试窗口中收到以下消息:
IdentityServer4.Hosting.IdentityServerMiddleware: Information: Invoking IdentityServer endpoint: IdentityServer4.Endpoints.AuthorizeEndpoint for /connect/authorize
IdentityServer4.Validation.AuthorizeRequestValidator: Error: Invalid redirect_uri: https://localhost:44388/signin-oidc
{
"ClientId": "testClient",
"ClientName": "Security.Client",
"AllowedRedirectUris": [
"http://localhost:44388/siginin-oidc"
],
"SubjectId": "anonymous",
"RequestedScopes": "",
"Raw": {
"client_id": "testClient",
"redirect_uri": "https://localhost:44388/signin-oidc",
"response_type": "code id_token",
"scope": "openid profile offline_access",
"response_mode": "form_post",
"nonce": "637208292641572630.ODk4NzdjNWEtMzNhOC00MmMwLThlNDAtZDc4YzcxZGUxMjM5MjMyMmU5NzUtY2IwNC00Zjg2LThmZDUtNmNlNDM3YjI0ODNk", "state": "CfDJ8AywpzlcvXBBkeIc2klEDRx1T9KQXlL4fQ9H23M0c-gOdQy9WdjC9EQo0uStq6ANZoCuVLa3e2za0THaInRuEE0OoHYCwORHlJIbv08hV_NSQl94TZTA80t-sxmwQuLyGq5t5kIO4n8e39YUlQKn3A5ybfO9jf-1Ryu1vn2cdZwMxpSfzkoCSq7OsZB_eOfqItU1UlahnUzizJTabGQamFfJKqT1kx5PvxY4NZEldrixJ1oy6RULk5xRhwf6awC5vQf7jds8PU9n7EPUB-yIX-TXXlhLEPPrGyleCiiqQV94",
"x-client-SKU": "ID_NETSTANDARD2_0",
"x-client-ver": "5.5.0.0"
}
}
我的用户界面是 .Net core 3.1 MVC
我的 IdentityServer url 显示为 http://localhost:44387/
点击发现文档链接,我可以在下面看到
到目前为止,我添加了 Hardcode 一个客户端和 2 个用户:
下面是我的服务器文件夹结构。 wwwroot, QuickStart, Views文件夹我直接从urlhttps://github.com/IdentityServer/IdentityServer4.Quickstart.UI复制粘贴过来的
在我的 MVC 方面:
我的 MVC 网址是 https://localhost:44388/ 现在,当我单击登录时,它肯定会进入登录操作
【问题讨论】:
标签: c# .net-core identityserver4 .net-core-3.0 asp.net-core-3.1