All Projects → robisim74 → Angularspawebapi

robisim74 / Angularspawebapi

Licence: mit
Angular Single Page Application with an ASP.NET Core Web API that uses token authentication

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Angularspawebapi

Steam
☁️ Python package for interacting with Steam
Stars: ✭ 489 (+120.27%)
Mutual labels:  webapi, authentication
Aspnet5identityserverangularimplicitflow
OpenID Connect Code / Implicit Flow with Angular and ASP.NET Core 5 IdentityServer4
Stars: ✭ 670 (+201.8%)
Mutual labels:  aspnetcore, authentication
Angularwebpackvisualstudio
Template for ASP.NET Core, Angular with Webpack and Visual Studio
Stars: ✭ 497 (+123.87%)
Mutual labels:  aspnetcore, visual-studio
Aspnetcore Webapi Sample
This is a sample ASP.NET Core WebAPI
Stars: ✭ 310 (+39.64%)
Mutual labels:  webapi, aspnetcore
Aspnetcorewindowsauth
Local and Windows Authentication, ASP.NET Core MVC, IdentityServer4
Stars: ✭ 87 (-60.81%)
Mutual labels:  aspnetcore, authentication
Nswag
The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
Stars: ✭ 4,825 (+2073.42%)
Mutual labels:  webapi, aspnetcore
Cleanarchitecture.webapi
An implementation of Clean Architecture for ASP.NET Core 3.1 WebAPI. Built with loosely coupled architecture and clean-code practices in mind.
Stars: ✭ 615 (+177.03%)
Mutual labels:  webapi, aspnetcore
worddaze
A Blazor Powered Blogging Application
Stars: ✭ 78 (-64.86%)
Mutual labels:  aspnetcore, webapi
Znetcs.aspnetcore.authentication.basic
A simple basic authentication middleware.
Stars: ✭ 40 (-81.98%)
Mutual labels:  aspnetcore, authentication
Aspnetcore.authentication.apitoken
A asp.net core webapi token authentication & generator open source library.
Stars: ✭ 26 (-88.29%)
Mutual labels:  aspnetcore, authentication
Aspnetcoreapistarter
An ASP.NET Core (v2.1) Web API project to quickly bootstrap new projects. Includes Identity, JWT authentication w/ refresh tokens.
Stars: ✭ 304 (+36.94%)
Mutual labels:  webapi, aspnetcore
Active Directory Dotnet Webapp Webapi Openidconnect Aspnetcore
An ASP.NET Core web application that authenticates Azure AD users and calls a web API using OAuth 2.0 access tokens.
Stars: ✭ 124 (-44.14%)
Mutual labels:  webapi, aspnetcore
SparkTodo
TodoList WebApi Powered by ASP.Net Core and JWT token auth
Stars: ✭ 37 (-83.33%)
Mutual labels:  aspnetcore, webapi
Run Aspnetcore Realworld
E-Commerce real world example of run-aspnetcore ASP.NET Core web application. Implemented e-commerce domain with clean architecture for ASP.NET Core reference application, demonstrating a layered application architecture with DDD best practices. Download 100+ page eBook PDF from here ->
Stars: ✭ 208 (-6.31%)
Mutual labels:  aspnetcore, authentication
minimal-apis.github.io
Tutorials and samples for ASP.NET Core Minimal APIs
Stars: ✭ 47 (-78.83%)
Mutual labels:  aspnetcore, webapi
Equinoxproject
Full ASP.NET Core 5 application with DDD, CQRS and Event Sourcing concepts
Stars: ✭ 5,120 (+2206.31%)
Mutual labels:  aspnetcore, visual-studio
aspnet-api-versioning
Provides a set of libraries which add service API versioning to ASP.NET Web API, OData with ASP.NET Web API, and ASP.NET Core.
Stars: ✭ 2,396 (+979.28%)
Mutual labels:  aspnetcore, webapi
run-aspnetcore-basics retired
One Solution - One Project for web application development with Asp.Net Core & EF.Core. Only one web application project which used aspnetcore components; razor pages, middlewares, dependency injection, configuration, logging. To create websites with minimum implementation of asp.net core based on HTML5, CSS, and JavaScript. You can use this boi…
Stars: ✭ 15 (-93.24%)
Mutual labels:  visual-studio, aspnetcore
Weapsy
ASP.NET Core CMS
Stars: ✭ 748 (+236.94%)
Mutual labels:  webapi, aspnetcore
Aspnetcore Ddd
Full ASP.NET Core 3.1 LTS application with DDD, CQRS and Event Sourcing
Stars: ✭ 88 (-60.36%)
Mutual labels:  webapi, aspnetcore

Angular SPA Web API

Angular v7 Single Page Application with an ASP.NET Core WebAPI that uses token authentication. The OAuth 2.0 Resource Owner Password Credentials grant (ROPC) is implemented using IdentityServer4 and ASP.NET Core Identity as membership system with a SQLite database.

Get the Changelog.

Live example and its explanation.

ROPC grant requires the use of SSL.

For more complex scenarios, where web services are required by more than one application or third-party applications, you should use an OpenID Connect implicit flow.

Features

  • Angular v7 & ASP.NET Core 2.1
  • Angular CLI
  • AoT compilation in development & production mode
  • Angular CLI, .NET Core CLI or Visual Studio 2017
  • Angular Material
  • IdentityServer4 & ASP.NET Core Identity
  • Resource Owner Password Credentials grant
  • Refresh token
  • Role based Authorization
  • Development, Staging & Production environments

Project structure

The structure of the project is based on Angular CLI ASP.NET Core.

AngularSPAWebAPI

  • ClientApp Angular application
  • Controllers
    • IdentityController.cs Identity APIs
    • ValuesController.cs Resources APIs
  • Data Entity Framework migrations
  • Models
    • ApplicationUser.cs Profile data for application users
  • Properties
    • lanchSettings.json ASP.NET Core environments
  • Services
    • DbInitializer.cs Provides method to populate the db
  • wwwroot Root for Angular application deployment
  • Config.cs IdentityServer4 configuration
  • IdentityDB.sqlite SQLite database
  • Startup.cs WebAPI configuration

Installing

Command line & .NET Core CLI

  • In ClientApp folder run: npm install
  • dotnet build

Visual Studio 2017

  • In ClientApp folder run: npm install
  • Build the solution

Running

The app will be served on https://localhost:5001

Command line & .NET Core CLI

Development

  • dotnet watch run

Staging

  • In ClientApp folder run: npm run build:staging
  • dotnet run --launch-profile Staging

Visual Studio 2017

Development

  • Select AngularSPAWebAPI profile
  • Start debugging

Staging

  • In ClientApp folder run: npm run build:staging
  • Select Staging profile
  • Start debugging

Deployment

  • In ClientApp folder run: npm run build:prod
  • Publish

Changing db

To use another database, for example SQLServer:

  • Edit in Startup.cs:
services.AddDbContext<ApplicationDbContext>(options =>
    options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
  • Edit ConnectionStrings in appsettings.json:
"ConnectionStrings": {
  "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=IdentityDB;Trusted_Connection=True;MultipleActiveResultSets=true"
}

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].