Elv*_*ryx 3 authentication identityserver4
响应中的访问令牌包含以下声明:
"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" ]
Run Code Online (Sandbox Code Playgroud)
这是配置告诉我的应用程序使用IdentityServer进行身份验证
app.UseIdentityServerAuthentication(
new IdentityServerAuthenticationOptions
{
Authority = "https://localhost:44350/",
ApiName = "customAPI",
ApiSecret = "secret",
AllowedScopes = {"customAPI.full_access", "customAPI.read_only" },
RequireHttpsMetadata = false
});
Run Code Online (Sandbox Code Playgroud)
如何让用户在不同的别名IdentityServer一旁的身份验证的https://本地主机:44350 /例如:http://192.168.1.20:44350/?
目前,来自后一个域的令牌获取在我的客户端上被视为无效,该客户端具有对前域的权限设置.
在ConfigureServices方法中添加IdentityServer时,可以设置静态颁发者名称.这是关于传入的选项AddIdentityServer.
https://identityserver4.readthedocs.io/en/release/reference/options.html