Coder Social home page Coder Social logo

kkoziarski / aspnet-identity-custom-users Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 2.0 179 KB

Example of custom membership system using ASP.NET Identity 2, ASP.NET Web API 2 and OWIN Bearer token authentication

C# 68.13% ASP 0.12% TypeScript 22.77% JavaScript 1.72% HTML 5.95% CSS 1.30%
webapi-2 aspnet-webapi2 oauth2 aspnetidentity angular5 bearer-authentication angular-jwt jwt-authentication jwt-bearer-tokens

aspnet-identity-custom-users's Introduction

Example of custom membership system using ASP.NET Identity 2, ASP.NET Web API 2 and OWIN Bearer token authentication

The AspNetIdentity.WebApi is an HTTP ASP.NET WebApi 2 service which acts as back-end for SPA frontend AspNetIdentity.Angular built using Angular 5.

Default users with passwords (e.g SuperPowerUser) are created in AspNetIdentity.WebApi.Migrations.Configuration.CreateUsers

Backend

Custom UserManager and tables

Implementation for the custom Microsoft.AspNet.Identity.UserManager with own custom database entities:

  • XUser with custom columns
  • XRole
  • XUserRole
  • XLogin
  • XClaim
  • managers: XUserManager and XRoleManager

EntityFramework entities are mapped to custom database tables.

OAuth 2.0 Bearer Access Token

OAuth 2.0 Bearer Access Token generation and consumption is implemented in Startup.Auth.cs mainly by

  • Identity\Providers\CustomOAuthProvider.cs
  • Identity\Providers\JwtTokenFormat.cs
  • Identity\Providers\RefreshTokenProvider.cs

Frontend

AspNetIdentity.Angular

The app was generated with angular-cli and can be run by npm install and then npm start and is hosted on http://localhost:4200/


References & Sources

tjoudeh/AspNetIdentity.WebApi

Angular 2/4 JWT Authentication Example & Tutorial

auth0/angular2-jwt

aspnet-identity-custom-users's People

Contributors

kkoziarski avatar

Watchers

 avatar  avatar

Forkers

itspaul

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.