Jeremy
Jeremy

Reputation: 1073

Adding custom properties to ASP.NET Identity with IdentityServer3

Using IdentityServer3 with ASP.NET Identity as an OAuth server, I can return roles and claims in the token response. If I want to override IdentityUser and add LastName, how would I return that in the token response? Or do I need to add LastName to AspNetUserClaims table instead of in the IdentityUser object/AspNetUsers table?

Upvotes: 1

Views: 659

Answers (1)

Jeremy
Jeremy

Reputation: 1073

It looks like you may have to override GetClaimsForAuthenticateResult() in the UserService. I tried adding a ClaimesIdentityFactory to the UserManager but it seems that doesn't actually get executed anymore.

https://github.com/IdentityServer/IdentityServer3/issues/1204

Upvotes: 1

Related Questions