我们可以在 Identity Server 4 中设置静态颁发者吗?
Can we set a static issuer in Identity Server 4?
响应中的访问令牌包含以下声明:
"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/ e.g : http://192.168.1.20:44350/?
因为目前从后一个域获得的令牌在我的客户端上被认为是无效的,该客户端具有对前一个域的权限设置。
在ConfigureServices
方法中添加IdentityServer时可以设置一个静态发布者名称。它在传递给 AddIdentityServer
.
的选项上
https://identityserver4.readthedocs.io/en/release/reference/options.html
响应中的访问令牌包含以下声明:
"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/ e.g : http://192.168.1.20:44350/?
因为目前从后一个域获得的令牌在我的客户端上被认为是无效的,该客户端具有对前一个域的权限设置。
在ConfigureServices
方法中添加IdentityServer时可以设置一个静态发布者名称。它在传递给 AddIdentityServer
.
https://identityserver4.readthedocs.io/en/release/reference/options.html