Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapper throw exception on clientclaims on 4.0.0-rc.2 #41

Open
dsquadcgi opened this issue Nov 18, 2020 · 1 comment
Open

mapper throw exception on clientclaims on 4.0.0-rc.2 #41

dsquadcgi opened this issue Nov 18, 2020 · 1 comment

Comments

@dsquadcgi
Copy link

dsquadcgi commented Nov 18, 2020

Hello
thanks for the great work

i have a issue on version 4.0.0-rc.2 due to automapper configuration

adding a client claim and store it runs perfectly
but fetching it fails because of a type mapping missing between claim client and securityclaim

code to reproduce
Client c= new Client()
{
ClientId = clientId,
AllowedScopes = new List(new string[] { "dsquad:public" }),
ClientSecrets = secrets,
AllowedGrantTypes = GrantTypes.ClientCredentials,
AccessTokenType = AccessTokenType.Jwt,
AccessTokenLifetime = int.MaxValue,
Enabled = true,
AlwaysSendClientClaims = true,
ClientClaimsPrefix = ""
};
c.Claims.Add(new ClientClaim("hello", ""world"));
c.ToEntity().ToModel(); // throw exception

tbureck added a commit to tbureck/IdentityServer4.Contrib.MongoDB that referenced this issue Dec 23, 2020
@tbureck
Copy link
Contributor

tbureck commented Dec 23, 2020

Hi,

thanks for reporting this issue. I've opened a PR that should fix this bug. Gonna contact diogo so that he can merge and hopefully release soon :)

Best regards

diogodamiani pushed a commit that referenced this issue Sep 14, 2021
* Issue #42 Fixes user claims mapping for IdentityResource, ApiResource and ApiScope

* Issue #41 Fix exception when mapping client claims from entity to model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants