我已经配置IdentityServer3 EF和AspNetIdentity。我有3个MVC客户端应用程序。所有用户和客户端都在SQL DB中配置。我能得到它的工作,用户现在可以登录。IdentityServer3:如何将ClientSecret分配给MVC客户端?
现在我想要添加各地客户的一些安全&用户和我有关系
1>是否MVC客户端只适用于几个问题隐式流?我有MVC客户端,下面是OWIN启动。
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = "Cookies"
});
app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
{
Authority = "https://localhost:44314/identity",
Scope = "openid",
ClientId = "LocalHostMvcClient",
RedirectUri = "http://localhost:34937/",
ResponseType = "id_token",
SignInAsAuthenticationType = "Cookies"
});
}
}
在IdentityServer,当我改变的LocalHostMvcClient
流向任何流量(除了“隐”),然后客户端收到错误The client application is not known or is not authorized.
。所以它看起来像MVC客户端 它只适用于Implicit
流程。 这是真的吗?
2> ClientSecret与Implicit
流程无关吗? 我想使用ClientSecret,但看起来它与Implicit
流程无关。基于documentation ClientSecret仅与需要秘密的流相关。如果回答问题1是真的,那么是否意味着我不能使用ClientSecret和Implicit
Flow?
3>如果我有多个客户端和用户。我们可以将用户分配给特定的客户吗? 例如,如果我有3个客户,www.client1.com,www.client2.com,www.client3.com和2个用户User1,User2。我希望User1只能登录www.client1.com 这可能吗?