Skip to content
This repository has been archived by the owner on Dec 20, 2018. It is now read-only.

ASP.NET Identity 3 without Roles and using only Claims #581

Closed
mdmoura opened this issue Oct 5, 2015 · 12 comments
Closed

ASP.NET Identity 3 without Roles and using only Claims #581

mdmoura opened this issue Oct 5, 2015 · 12 comments

Comments

@mdmoura
Copy link

mdmoura commented Oct 5, 2015

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

@mdmoura mdmoura changed the title ASP.NET Identity 3 without Roles and using only Claimns ASP.NET Identity 3 without Roles and using only Claims Oct 5, 2015
@leastprivilege
Copy link

spot on ;p

@blowdart @HaoK @rustd

@alexsandro-xpt
Copy link

In a ASP.net Identity on ASP.net MVC 5 is fully possible. In MVC 6 I guess, yes!

@mdmoura
Copy link
Author

mdmoura commented Oct 5, 2015

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 ...

@tugberkugurlu
Copy link
Contributor

👍

@divega divega modified the milestones: 3.0.0-rc2, Backlog Nov 11, 2015
@divega
Copy link

divega commented Nov 11, 2015

Moving to RC2 so we can look into it soon.

@rustd rustd modified the milestones: Backlog, 3.0.0-rc2 Dec 7, 2015
@mdmoura
Copy link
Author

mdmoura commented Dec 16, 2015

Any change this to be available on RC2?

@HaoK HaoK removed their assignment Dec 28, 2015
@gilmishal
Copy link

Is their any update on this issue?

@HaoK HaoK modified the milestones: 1.2.0, Backlog Oct 26, 2016
@HaoK
Copy link
Member

HaoK commented Oct 26, 2016

We should revisit this and see if this is something we want to do in 1.2

@HaoK HaoK removed this from the 1.2.0 milestone Oct 26, 2016
@dcga
Copy link

dcga commented Feb 24, 2017

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.

@HaoK
Copy link
Member

HaoK commented Jun 13, 2017

Yup we plan on doing this for 2.0, tracked via #1269

@HaoK HaoK closed this as completed Jun 13, 2017
@HaoK HaoK added the duplicate label Jun 13, 2017
@Ponant
Copy link
Contributor

Ponant commented Nov 7, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants