Code Monkey home page Code Monkey logo

identity's Introduction

ASP.NET Core Identity [Archived]

This GitHub project has been archived. Ongoing development on this project can be found in https://github.com/aspnet/AspNetCore.

ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data. ASP.NET Core Identity allows you to add login features to your application and makes it easy to customize data about the logged in user.

This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the AspNetCore repo.

ASP.NET Identity for ASP.NET MVC 5

The previous versions of Identity for MVC5 and lower, previously available on CodePlex, are available at https://github.com/aspnet/AspNetIdentity

Community Maintained Store Providers

IMPORTANT: Extensions are built by a variety of sources and not maintained as part of the ASP.NET Identity project. When considering a third party provider, be sure to evaluate quality, licensing, compatibility, support, etc. to ensure they meet your requirements.

identity's People

Contributors

ajaybhargavb avatar ajcvickers avatar analogrelay avatar aspnetci avatar bchavez avatar blowdart avatar brennanconroy avatar bricelam avatar chengtian avatar davidfowl avatar dougbu avatar eilon avatar grabyourpitchforks avatar haok avatar hishamco avatar javiercn avatar jbagga avatar juntaoluo avatar kichalla avatar mikeharder avatar natemcmaster avatar ntaylormullen avatar pakrym avatar pranavkm avatar ryanbrandenburg avatar rynowak avatar tratcher avatar troydai avatar tugberkugurlu avatar yukozh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

identity's Issues

Revisit User and Roles mapping

Currently for the EF implementation the user and roles are mapped through an intermediate class IdentityUserRole. It might be redundant in that we can follow EF conventions to have the many to many mapping between users and roles. Might not be specific for the alpha release but we can revisit this for the long run

Support Windows and Windows Phone apps

Many components in this project are not tied to ASP.NET/OWIN, and I would love to be able to use them for local authentication in my Windows and Windows Phone apps.

InMemoryRoleStore should be generic

I am trying to create an abstraction over the identity layer because when the in memory store will be obsolete, I want to easily change to Azure Storage or SQL.
I am not able to fully do this because the InMemoryRoleStore is not generic and I cannot specify the type of the role class like I can do for InMemoryUserStore

See the code below for repro and error:

internal class AppUser : InMemoryUser
{
}

internal class AppUserRole : InMemoryRole
{
}

internal static class IdentityFactory
{
    public async Task<UserManager<AppUser, string>> CreateNewUserManager()
    {
        UserManager<AppUser, string> userManager = new UserManager<AppUser, string>(new InMemoryUserStore<AppUser>());

        return userManager;
    }

    // I want to return RoleManager<AppUserRole> not RoleManager<InMemoryRole>
    public async Task<RoleManager<AppUserRole>> CreateNewRoleManager()
    {
        // Error: Argument 1: cannot convert from 'Microsoft.AspNet.Identity.InMemory.InMemoryRoleStore' to 'Microsoft.AspNet.Identity.IRoleStore<WebSimulator.Identity.AppUserRole,string>'
        RoleManager<AppUserRole> roleManager = new RoleManager<AppUserRole>(new InMemoryRoleStore());

        return roleManager;
    }
}

Add Identity Extensions

Before
services.AddIdentity(identityServices =>
{
identityServices.AddEntity();
});
services.AddTransient<SignInManager>();

After
services.AddIdentityAddEntity().AddSecurity()

Customize Error Messages

What is the best way to customize error messages coming from the FX as an application developer

Identity EF implementation

Make the full implementation of Identity/EF work so that we can exercise the complex model that we have and fix bugs in EF to support this scenario

Identity Layering and package naming

Since we are going to support Identity on Phone and other platforms we should consider the package naming and layering
The package names should be Microsoft.Framework.Identity*

RemoveFromRoleAsync does not remove the role as expected

The RemoveFromRoleAsync method does not the remove the user from the role that is passed. This is not seen if there is just one role in the system but if there is more than one

Issue: In RemoveFromRoleAsync method on the UserStore, the condition that checks the role to remove is incorrect

Instead of
var userRole = user.Roles.FirstOrDefault(r => roleEntity.Name.ToUpper() == roleName.ToUpper());

should be
var userRole = user.Roles.FirstOrDefault(r => r.Id == roleName.Id);

services.AddSecurity

services.AddIdentity(identityServices =>
{
identityServices.AddEntity().AddSecurity();
});

Add Role claim functionality

Add the ablity to add claims to role, and flow those to the user's identity when logging in. This will require changes in the ClaimsIdentityFactory to reference a Role manager

Need to rehash password if custom PasswordHasher returns PasswordVerificationResult.SuccessRehashNeeded

If the user implements a custom PasswordHasher and returns the PasswordVerificationResult.SuccessRehashNeeded in the 'VerifyHashedPassword' method, we need to rehash the password and store it back into the database.

This is not implemented currently, for example. in the Find method for usermanager we verify if the verification code is not 'Failed'. If not we return true. We can check if the code is PasswordVerificationResult.SuccessRehashNeeded and rehash the password

Add additional property in IdentityUserLogins to store friendly provider name

For apps that have WsFed middleware registered, logging in using the WsFed provider does not display a user friendly name in the Manage page. The issue is that the value is taken from the LoginProvider property which is populated from the Issuer claim value after login. Once logged in there is no way to retrieve the friendly name for the provider

We need to add an additional property to store the friendly provider name and this can populated from the AuthenticationDescription property in the login result

UserManager in new DI not created per request

The new DI approach for creating UserManager does not seem to create it per request but instead for the entire lifetime of the application with the same object being reused.

Need to get this changed to return UserManager per request

Event Logging/Auditing

have a way of logging events which can be traced through the common logging Fx. Some examples are as follows.
○ SignIn/ SignOut
○ Password resets
○ Account confirmed

Options v2

  • Add a new assembly inside of the Configuration Repo called Microsoft.Framework.OptionsModel and move all of the options into this assembly
  • Hosting would depend on this assembly to add OptionsServices.DefaultServices as part of app.UseServices() (lifetime of open generic is singleton)
  • Add a new extension method T Get where T : IConvertable to Configuration
  • Add ConfigOptionsSetup which takes IConfiguration and is registered as an open generic
  • Add ConfigSetup method which registers an IConfigOptionsSetup
  • Add static helper method Bind(IConfiguration, object) to OptionsServices
  • Keep default options orders as internal constants for now (Configuration = -1000, Default = 0)
  • Support recursive binding so IdentityOptions can just use ConfigOptions directly (do not support lists/dictionaries for now, but its possible to add later)

[MusicStore]: Identity throws a MissingManifestResourceException on coreclr

For example try to simulate the condition when you try to register the same user for the second time. In net45 it throws a proper error message. In CoreClr I get the following exception. Probably something wrong when it tries to read the resource string.

An unhandled exception occurred while processing the request.

MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Microsoft.AspNet.Routing.Resources.resources" was correctly embedded or linked into assembly "Microsoft.AspNet.Identity" at compile time, or that all the satellite assemblies required are loadable and fully signed.
System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName)

Stack Query Cookies Headers Environment
MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Microsoft.AspNet.Routing.Resources.resources" was correctly embedded or linked into assembly "Microsoft.AspNet.Identity" at compile time, or that all the satellite assemblies required are loadable and fully signed.
System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName)
System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
Microsoft.AspNet.Identity.Resources.get_DuplicateName()
Microsoft.AspNet.Identity.UserValidator`1.<ValidateUserName>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()

Implement Azure Table Storage support

Hi,

I think add support for Table Storage is a good feature, as it's fast and reliable.

How I could contribute with this feature?

Thanks,

Gabriel Marquez

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.