IdentityServer4.Contrib.MongoDB icon indicating copy to clipboard operation
IdentityServer4.Contrib.MongoDB copied to clipboard

mapper throw exception on clientclaims on 4.0.0-rc.2

Open dsquadcgi opened this issue 5 years ago • 1 comments
trafficstars

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

dsquadcgi avatar Nov 18 '20 18:11 dsquadcgi

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

tbureck avatar Dec 23 '20 17:12 tbureck