Skip to content

UserIdentity #128

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

Closed
ekjuanrejon opened this issue Dec 7, 2018 · 5 comments
Closed

UserIdentity #128

ekjuanrejon opened this issue Dec 7, 2018 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@ekjuanrejon
Copy link
Contributor

Hello

How to extend UserIdentity when using the nuget packages. The IoC does not seem to play nice

@skoruba
Copy link
Owner

skoruba commented Dec 13, 2018

Hi @ekjuanrejon
Have you tried to create your UserIdentity object and pass it into DI?
Please, follow these steps - https://github.com/skoruba/IdentityServer4.Admin/blob/master/docs/Configure-To-Existing-Identity.md
Let me know if you will have any issues.
Thanks-

@skoruba skoruba self-assigned this Dec 13, 2018
@skoruba skoruba added the question Further information is requested label Dec 13, 2018
@ekjuanrejon
Copy link
Contributor Author

Hello I wanted to added more properties like FacilityId and OrganizationId but I don't think it is not supported. I ended up updating Skoruba.IdentityServer4.Admin.EntityFramework.Identity.Entities.Identity.UserIdentity and created a new nuget package.

I tried to inherit from that class but the IoC was failing.

@pbros
Copy link
Contributor

pbros commented Feb 6, 2019

Hello,

I am trying to achieve the same thing. One of the issues that I see is that the AdminDbContext specifies "UserIdentity" directly and not a generic type that can be injected.

The documentation (https://github.com/skoruba/IdentityServer4.Admin/blob/master/docs/Configure-To-Existing-Identity.md) relies on changing the code in Skoruba.IdentityServer4.Admin.EntityFramework.DbContexts and Skoruba.IdentityServer4.Admin.EntityFramework.Identity. When using the project template, these 2 projects are included as Nuget, so we can't make these changings without forking and and compiling our own versions of these projects.

Would adding generic types to the AdminDbContext be possible and could it potentially allow specifying our own UserIdentity class to be done easily?

@skoruba
Copy link
Owner

skoruba commented Feb 7, 2019

Hello @pbros
currently, it is designed that if you want to use another Identity model, you have to create your own DbContext. :)
Good point, I will think about generic version of DbContext as well.
Thanks.

@skoruba skoruba mentioned this issue Apr 4, 2019
@skoruba
Copy link
Owner

skoruba commented Apr 4, 2019

Done on master. Please check new release.
Thanks!

@skoruba skoruba closed this as completed Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants