C
C#2y ago
𝕭ourn

✅ Add Identity to existing ASP.NET Web API

Hello everyone! I have an existing web api project, to which i want to add Identity. I'm working on a chat application, which uses SignalR for realtime communication. Currently, messages are broadcasted to anyone subscribed to the SignalR Hub managing conversations. Doing my research, looks like with Identity you can directly send a message to a specific user, by its username (instead of using its Context.connectionId or the single-groups hack). But i have no idea of how Identity works, and how to configure it. Can someone help me understand more of this topic? I also want to mention that i'm using MySQL as my main database, and configured the generation of JWT tokens.
9 Replies
JakenVeina
JakenVeina2y ago
what do you mean when you say "Identity"? cause that can mean about 5 different things
𝕭ourn
𝕭ournOP2y ago
Introduction to ASP.NET Identity - ASP.NET 4.x
The ASP.NET membership system was introduced with ASP.NET 2.0 back in 2005, and since then there have been many changes in the ways web applications typicall...
𝕭ourn
𝕭ournOP2y ago
Basically, from what i've understood so far, it's a full-blown auth system built into asp.net core. As i've said, i'm new to it an quite frankly i don't even know if i really need it
JakenVeina
JakenVeina2y ago
this is an existing ASP.NET project? not ASP.NET Core?
𝕭ourn
𝕭ournOP2y ago
asp net core
Messiah
Messiah2y ago
I'm pretty sure it's just a matter of adding builder.services.AddAuthentication() and asp.net starts using it but the library is huge and hugely abstracted
JakenVeina
JakenVeina2y ago
the docs you linked all for classing ASP.NET, so you can nix those you want this
JakenVeina
JakenVeina2y ago
Introduction to Identity on ASP.NET Core
Use Identity with an ASP.NET Core app. Learn how to set password requirements (RequireDigit, RequiredLength, RequiredUniqueChars, and more).
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server