Giter Site home page Giter Site logo

quanliang2000 / aspnetcoreapistarter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mmacneil/aspnetcoreapistarter

0.0 1.0 0.0 180 KB

An ASP.NET Core (v2.1) Web API project to quickly bootstrap new projects. Includes Identity, JWT authentication w/ refresh tokens.

Home Page: https://fullstackmark.com/post/19/jwt-authentication-flow-with-refresh-tokens-in-aspnet-core-web-api

License: MIT License

C# 100.00%

aspnetcoreapistarter's Introduction

AspNetCoreApiStarter

An ASP.NET Core (v2.1) Web API project to quickly bootstrap new projects. Includes Identity, JWT authentication w/ refresh tokens.

Setup

  • Uses Sql Server Express LocalDB (If using Visual Studio install it under Individual Components in the Visual Studio installer or install separately using this link.
  • Apply database migrations to create the db. From a command line within the Web.Api.Infrastructure project folder use the dotnet CLI to run :
  • Web.Api.Infrastructure>dotnet ef database update --context AppDbContext
  • Web.Api.Infrastructure>dotnet ef database update --context AppIdentityDbContext

Visual Studio

Open the solution file AspNetCoreApiStarter.sln and build/run.

Visual Studio Code

Open the src folder and F5 to build/run.

Swagger Enabled

To explore and test the available APIs simply run the project and use the Swagger UI.

The available APIs include:

  • POST /api/accounts - Creates a new user.
  • POST /api/auth/login - Authenticates a user.
  • POST /api/auth/refreshtoken - Refreshes expired access tokens.
  • GET /api/protected - Protected controller for testing role-based authorization.

Contact

[email protected]

aspnetcoreapistarter's People

Contributors

mmacneil avatar

Watchers

 avatar

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.