tugberkugurlu / AspNetCore.Identity.MongoDB

MongoDB Data Store Adaptor for ASP.NET Core Identity
MIT License
229 stars 69 forks source link

I think RoleStore absent .. #24

Closed CanMehmetK closed 6 years ago

CanMehmetK commented 7 years ago

Need role store,

teşekkürler.

tugberkugurlu commented 7 years ago

Dup of https://github.com/tugberkugurlu/AspNetCore.Identity.MongoDB/pull/6, see the comments there.

Why do you need role store? Why can't you just use claims to store roles?

CanMehmetK commented 7 years ago

regarding this page https://docs.microsoft.com/en-us/aspnet/core/security/authorization/roles

these is still UserRoleStore implementations in identity.. Surely yes Claims is another option but i guess using role is ansenario beside that calims is another story.

I just need to implement this for dynamic authorization with static roles. https://docs.microsoft.com/en-us/aspnet/core/security/authorization/resourcebased

thanks for solution learned some in sample also i changed AddDefaultTokenProviders like put them in this that contained in ConfigureServices
services.AddIdentity<IdentityUser, IdentityRole>(options => { options.SignIn.RequireConfirmedEmail options.SignIn.RequireConfirmedPhoneNumber options.Tokens.ChangeEmailTokenProvider options.Tokens.EmailConfirmationTokenProvider

by this way i could see all options together

regards and thnks for code..

tugberkugurlu commented 7 years ago

i guess using role is ansenario beside that calims is another story

What I meant is that you can store the roles as a claim. Doesn't this work?

dealproc commented 6 years ago

@SorenZ Are we able to close this issue?