Coder Social home page Coder Social logo

identityserversystem's People

Contributors

tilark avatar

Stargazers

 avatar

Watchers

 avatar  avatar

identityserversystem's Issues

IdentityResource如果有2个ClaimTypes,给用户添加UserClaim时,如果只添加1个,出现错误

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”

客户端向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提示。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.