All Projects → BenjaminAbt → Samples.aspnetcore Identityserver4

BenjaminAbt / Samples.aspnetcore Identityserver4

Licence: other
IdentityServer4 sample with .NET Core and ASP.NET Core 2.0

Projects that are alternatives of or similar to Samples.aspnetcore Identityserver4

Buildingblocks
Building blocks for Aspnet Core Microservices Development
Stars: ✭ 43 (-62.61%)
Mutual labels:  aspnetcore, dotnetcore, identityserver4
Angularaspnetcoreoauth
Sample project demonstrating user authentication and identity with Angular, Asp.Net Core and IdentityServer4
Stars: ✭ 268 (+133.04%)
Mutual labels:  aspnetcore, oauth2, identityserver4
Identityserver4 Swagger Integration
How to get Swashbuckle or NSwag Swagger UI's working with IdentityServer 4
Stars: ✭ 60 (-47.83%)
Mutual labels:  aspnetcore, oauth2, identityserver4
Aspnet5identityserverangularimplicitflow
OpenID Connect Code / Implicit Flow with Angular and ASP.NET Core 5 IdentityServer4
Stars: ✭ 670 (+482.61%)
Mutual labels:  aspnetcore, oauth2, identityserver4
Aspnetcoreangularsignalrsecurity
Security with ASP.NET Core, SignalR and Angular
Stars: ✭ 171 (+48.7%)
Mutual labels:  aspnetcore, oauth2, identityserver4
Jpproject.identityserver4.adminui
🔧 ASP.NET Core 3 & Angular 8 Administration Panel for 💞IdentityServer4 and ASP.NET Core Identity
Stars: ✭ 717 (+523.48%)
Mutual labels:  aspnetcore, oauth2, identityserver4
Identityserver4
OpenID Connect and OAuth 2.0 Framework for ASP.NET Core
Stars: ✭ 8,428 (+7228.7%)
Mutual labels:  oauth2, identityserver4
Identitybase
IdentityBase is a Universal Identity Platform for web, mobile and IoT built on top of IdentityServer.
Stars: ✭ 112 (-2.61%)
Mutual labels:  oauth2, identityserver4
Dotnet Istanbul Microservices Demo
This is the demo application that i created for my talk 'Microservice Architecture & Implementation with Asp.Net Core' at Dotnet İstanbul Meetup Group.
Stars: ✭ 109 (-5.22%)
Mutual labels:  aspnetcore, dotnetcore
Aspnet.security.oauth.providers
OAuth 2.0 social authentication providers for ASP.NET Core
Stars: ✭ 1,186 (+931.3%)
Mutual labels:  aspnetcore, oauth2
Veil
A template renderer / view engine for .NET
Stars: ✭ 23 (-80%)
Mutual labels:  aspnetcore, dotnetcore
Aspnetboilerplate Core Ng
Tutorial for ASP.NET Boilerplate Core + Angular
Stars: ✭ 61 (-46.96%)
Mutual labels:  aspnetcore, dotnetcore
Aspnetcorespa
Asp.Net 5.0 & Angular 11 SPA Fullstack application with plenty of examples. Live demo:
Stars: ✭ 1,211 (+953.04%)
Mutual labels:  aspnetcore, identityserver4
Identityserver4.samples
Samples for IdentityServer4
Stars: ✭ 1,002 (+771.3%)
Mutual labels:  oauth2, identityserver4
Awesome Microservices Netcore
💎 A collection of awesome training series, articles, videos, books, courses, sample projects, and tools for Microservices in .NET Core
Stars: ✭ 865 (+652.17%)
Mutual labels:  aspnetcore, dotnetcore
Aspnetcoreid4external
external OpenID Connect Login to IdentityServer4 with AAD
Stars: ✭ 63 (-45.22%)
Mutual labels:  oauth2, identityserver4
Blazor.auth0
The library for using Auth0 in Blazor applications.
Stars: ✭ 111 (-3.48%)
Mutual labels:  dotnetcore, oauth2
Greatwall
Util应用框架配套的权限管理系统
Stars: ✭ 88 (-23.48%)
Mutual labels:  aspnetcore, identityserver4
Docker Series
Docker Series about containerizing ASP.NET Core app with MySQL..
Stars: ✭ 88 (-23.48%)
Mutual labels:  aspnetcore, dotnetcore
Quiz
Example real time quiz application with .NET Core, React, DDD, Event Sourcing, Docker and built-in infrastructure for CI/CD with k8s, jenkins and helm
Stars: ✭ 100 (-13.04%)
Mutual labels:  aspnetcore, dotnetcore

Goal

My goal was to build a sample with

  • .NET Core 2.0 Console
  • ASP.NET Core 2.0 Web App
  • ASP.NET Core 2.0 Web API

Another goal was to show how the user workflow of application trust should be for "internal" platform services as well as for external clients.

Donations

Please think twice and donate your money to useful institutions such as children's hospices.

Documentation

This sample shows the following workflow:

Workflow

We have an internal area which represents our trusted application environment. Additionally, we see an external example application we do not develop or run.

Consent

All our trusted "internal" applications can access all our APIs. External applications have to be accepted by the user via IdentityServer Consent

IdentityServer4-Sample-Consent

Projects

IdentityServerHost

This ASP.NET Core 2.0 application hosts the IdentityServer. All configurations like users, APIs and clients are static in the SampleConfig.cs file.

The IdentityServer is registered inside of Startup.cs

The sources inside the Quickstart are taken from https://github.com/IdentityServer/IdentityServer4.Quickstart.UI without modifications.

BaseApiSDK

This projects provides basic stuff for accessing an API with the help of a SDK. In a productive environment this would be a NuGet package.

TodoApi

This ASP.NET Core 2.0 application hosts the demo API of todos. All configurations like users, APIs and clients are static in the ApiSampleOptions.cs file.

TodoApiSdk

This projects provides a client TodoApiClient for accessing the TodoApi. It gives you a client for authentication and receiving typed data.

In a productive environment this would be a NuGet package.

PortalWebApp

This ASP.NET Core 2.0 application represents the "Portal Web Application" the user interacts with.

You have a navigation element to receive the tasks from the TodoApi with the help of the TodoApiSdk and you have a navigation element to watch your claims.

Both clicks will redirects you to the IdentityServerHost where you have to log in. Afterwards to will be redirected to this application.

ExternalWebApp

This ASP.NET Core 2.0 application represents an "External Web Application" which is not part of the platform and maybe run by an external company.

This application also provides a navigation element for tasks and claims but after the login the user has to accept the access for this application via via IdentityServer Consent as shown above.

AdminConsoleClient

This is just a simple console application with a usual name based on .NET Core 2.0. It represents a simple client which calls the API with the TodoApiSdk and hard coded user credentials.

In a real world scenario this could be any .NET desktop/server/mobile application.

Run this demo

Clone this repository or download this repository as zip file.

git clone https://github.com/BenjaminAbt/Samples.AspNetCore-IdentityServer4.git

See all information to run this demo below:

Endpoints

Application Url
Todo API http://localhost:9011/api/Tasks Returns a sample task collection
Portal Web http://localhost:9012/ "Internal" Web App
External Web http://localhost:9015/ "External" Web App

Sample Credentials

Username: ben

Password: password

Portal WebApp

Start IdentityServerHost, TodoApi and PortalWebApp via dotnet.exe on your cmd or use the parallel project startup configuration of Visual Studio (right click on the solution -> set startup projects)

VS2017-Startup-Projects

Once started, two browser instances will launch for IdentityServerHost and PortalWebApp. TodoApi will start without a browser instance.

BrowserStart

Click on Tasks in PortalWebApp. Unauthorized it will redirect you to the login site of the IdentityServer. Login

After your login was successful you will be redirected to the Tasks view.

Workflow: the PortalWebApp application uses the TodoApi client to receive the tasks from the TodoApi.

Tasks

External WebApp

Start IdentityServerHost, TodoApi and ExternalWebApp.

Click on Tasks and you will have to log into the IdentityServer and accept the application access request.

Afterwards you will be redirected to the WebApp and will see the tasks loaded from the TodoApi.

Admin Console

Start IdentityServerHost, TodoApi, AdminConsoleClient

VS2017-Startup-Admin

The console will now authenticate your instance with the hard-coded credentials and will request the TodoApi to get the tasks.

Admin

License

Released under the MIT license.

Versions

  • 1.1 (2017-10-07): Updated to stable release of IdentityServer 2.0
  • 1.0 (2017-09-26): Published
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].