tilark / identityserversystem Goto Github PK
View Code? Open in Web Editor NEWAddUIManageIdentityServer
AddUIManageIdentityServer
IdentityResource如果有2个ClaimTypes,给用户添加UserClaim时,如果只添加1个,则出现错误。
如customResource有“customClaimType1”“CustomClaimType2”。只添加customClaimType2一个值,则会出现错误IDX10501: Signature validation failed. Unable to match 'kid'。如何在没有customClaimType1的情况下,也能够正常运行呢?就像email为空,但仍然可以正常运行,只是不获得该值而已。
客户端向IdentityServer请求时,出现“Sorry, there was an error : unauthorized_client”。客户端的地址为"http://localhost:5002",IdentityServer的地址为"http://localhost:5000"。
客户端的配置为
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationScheme = "Cookies"
});
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();
app.UseOpenIdConnectAuthentication(new OpenIdConnectOptions
{
AuthenticationScheme = "oidc",
SignInScheme = "Cookies",
//Authority = "http://10.0.75.1:6005",
Authority = "http://localhost:5000",
ClientId = "mvc4",
Scope = { "ClientWithOpenIDResource" },
RequireHttpsMetadata = false,
SaveTokens = true
});
IdentityServer服务器的Client信息为
new Client
{
ClientId = "mvc4",
ClientName = "MVC Client",
AllowedGrantTypes = GrantTypes.Implicit,
RequireConsent = true,
RedirectUris = {"http://localhost:5002/signin-oidc "},
PostLogoutRedirectUris = {"http://localhost:5002/signout-callback-oidc"},
AllowedScopes = new List<string>
{
IdentityServerConstants.StandardScopes.OpenId,
IdentityServerConstants.StandardScopes.Profile,
IdentityServerConstants.StandardScopes.Email,
IdentityServerConstants.StandardScopes.Address,
IdentityServerConstants.StandardScopes.Phone,
"ClientWithOpenIDResource"
}
}
在客户端点击登陆按钮时,得到Sorry, there was an error : unauthorized_client提示。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.