Hello,
Is it possible to use ASP.NET Identity 3 in a MVC project only with Claims table and without Roles table?
I am asking this because Role is itself a Claim of type Role so isn't it redundant to have a Roles table?
Thank You
spot on ;p
@blowdart @HaoK @rustd
In a ASP.net Identity on ASP.net MVC 5 is fully possible. In MVC 6 I guess, yes!
IMHO:
1 - Using only roles and having one roles table;
In this case there would be the RolesStore ...
2 - Using claims, including roles, and having only one claims table.
In this case there would be the ClaimsStore ... Role is a Claim of type Role.
If this results in unwanted complexity why not having only one Claims table and if configuration includes only Roles then Claims table would allow only claims of type Role ...
I just think that having Roles and Claims tables when a Role is a Claim does not make sense.
@alexsandro-xpt:
Do you know where can I find an example of how to set ASP.NET Identity only with Claims?
I was looking and didn't find it ... I just found info on how to add claims on top of roles.
Better documentation for ASP.NET Identity would be great ...
And it would even help people to give better feedback ...
Using Identity abstraction c# classes you can optimize change Identity behavior as you wish, see some links:
Remeber, It's is for Identity compatible with ASP.net MVC 5, I don't know API changes of this new Identity.
:+1:
Moving to RC2 so we can look into it soon.
Any change this to be available on RC2?
Is their any update on this issue?
We should revisit this and see if this is something we want to do in 1.2
Is there a chance you can add an overload to the extension method AddIdentity so that you can write:
services.AddIdentity<AppUser>
.AddEntityFrameworkStores<AppUserCtx>()
.AddDefaultTokenProviders();
This of course, while you convince yourselves that it is better to roll with Claims only and eliminate the redundancy of Roles.
Yup we plan on doing this for 2.0, tracked via https://github.com/aspnet/Identity/issues/1269
Sure that Roles have no advantages over claims?
https://stackoverflow.com/questions/46910693/how-to-remove-the-role-related-tables-from-asp-net-identity-core-2-0/46910903
Most helpful comment
We should revisit this and see if this is something we want to do in 1.2