GithubHelp home page GithubHelp logo

Comments (19)

SimonTouchtech avatar SimonTouchtech commented on May 19, 2024 4

@Cybrosys FWIW, it is relatively simple to remove the dependency on Identity.EntityFramework by using UserManager instead of the model class directly to get its properties. This would mean e.g. replacing user.Id with await _userManager.GetUserIdAsync(user)

from identityserver4.

tibold avatar tibold commented on May 19, 2024 2

I looked into integration IdentityServer4 with Asp.Net Core Identity.
Here is my idea:
https://github.com/tibold/IdentityServer4.Contrib.AspNetIdentity

I have copied some tests from the core project and made them work with AspNet Identity.
Also created a sample project showing how the code is used. It is based on the default Asp.Net Core Web application template in Visual Studio. I tried to implement it with the least amount of changes.

What do you think?

from identityserver4.

Cybrosys avatar Cybrosys commented on May 19, 2024 1

I've written simple implementations of both, but they're tied to *.Identity.EntityFramework, in case someone's interested (the tie-in is because of my usage of the IdentityUser class).

AspNetIdentity ProfileService and ResourceOwnerPasswordValidator.zip

from identityserver4.

brockallen avatar brockallen commented on May 19, 2024

We will see. We're not yet sure what the IUserService will look like in IdSvr4.

In essence, though, there it won't be hard for you to do this yourself in IdSvr4 (and it wasn't all that hard in IdSvr3).

from identityserver4.

ry8806 avatar ry8806 commented on May 19, 2024

yeh, that's cool

Once you do know how the interface might look, then I wouldn't mind getting involved and writing the AspNetIdentity "bridge"

from identityserver4.

leastprivilege avatar leastprivilege commented on May 19, 2024

Cool. Thanks! I will leave this open then

from identityserver4.

ry8806 avatar ry8806 commented on May 19, 2024

Once you think you've finalised the IUserService interface (I understand you've got lots of other things to do) - could you let me know and I will start having a look at it :)

from identityserver4.

Cybrosys avatar Cybrosys commented on May 19, 2024

Is there a way to work around the limitation of just using InMemoryUser? It's possible to read all the users from a DB into memory. The only problem with that solution is how to handle when user information changes in the DB.

Everywhere it's used it's injected as a List<InMemoryUser>, if it instead was injected as IList<InMemoryUser> then it would've been possible to create an implementation that read from an external source/DB.

from identityserver4.

nikoszs avatar nikoszs commented on May 19, 2024

@Cybrosys please see #5 and the stackoverflow example to implement IUserService. Please note that IUserService will be replaced with something similar in the next release of Identity Server 4.

from identityserver4.

Cybrosys avatar Cybrosys commented on May 19, 2024

Thank you @alzdrak !

from identityserver4.

Cybrosys avatar Cybrosys commented on May 19, 2024

@ry8806 Update1 has been released. The two interfaces you're interrested in are IProfileService and IResourceOwnerPasswordValidator.

from identityserver4.

ry8806 avatar ry8806 commented on May 19, 2024

Thanks - do we have a separate Repo for this, like we do in IdentitfyServer3 ??

from identityserver4.

leastprivilege avatar leastprivilege commented on May 19, 2024

not before RC2

from identityserver4.

tibitoth avatar tibitoth commented on May 19, 2024

I think you need to prioritize this issue, because Identity Server is unuseable for many people without ASP.NET Identity support and samples.

from identityserver4.

tibitoth avatar tibitoth commented on May 19, 2024

Next week I will investigate on your solution.

from identityserver4.

brockallen avatar brockallen commented on May 19, 2024

I'll also take a look. Thx.

from identityserver4.

klanglie avatar klanglie commented on May 19, 2024

I have made some progress on this. It is not as abstract as IS3 IdentityManager. For instance, Reflection is more limited in .NET Core. I created my solution however so that you can switch between the default InMemoryUser implementation and EF easily. SEE: https://github.com/PivotalAnimal/BlueConcord.IdentityServer.EntityFrameworkCore

from identityserver4.

leastprivilege avatar leastprivilege commented on May 19, 2024

The SPA sample in the sample repo has asp.net id3 support.

from identityserver4.

lock avatar lock commented on May 19, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from identityserver4.

Related Issues (20)

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.