【发布时间】:2018-01-16 19:17:21
【问题描述】:
响应中的访问令牌包含以下声明:
"alg": "RS256",
"kid": "143e829c2b57489969753ba4f8205979df0da988c640cffa5f1f4eda1b6e6aa4",
"typ": "JWT"
"nbf": 1481451903,
"exp": 1481455503,
"iss": "https://localhost:44350",
"aud": [ "https://localhost:44350/resources", "customAPI" ],
"client_id": "oauthClient",
"scope": [ "customAPI.read" ]
这是告诉我的应用程序使用 IdentityServer 进行身份验证的配置
app.UseIdentityServerAuthentication(
new IdentityServerAuthenticationOptions
{
Authority = "https://localhost:44350/",
ApiName = "customAPI",
ApiSecret = "secret",
AllowedScopes = {"customAPI.full_access", "customAPI.read_only" },
RequireHttpsMetadata = false
});
如何允许用户在 IdentityServer 的不同别名上进行身份验证,除了 https://localhost:44350/ 例如:http://192.168.1.20:44350/?
由于目前从后一个域获取的令牌在我的客户端上被视为无效,该客户端将权限设置为前一个域。
【问题讨论】:
标签: authentication identityserver4