GithubHelp home page GithubHelp logo

promarcussmith / identityserver4.samples.mongo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from souzartn/identityserver4.samples.mongo

0.0 0.0 0.0 3.79 MB

Project inspired in the "IdentityServer4.Samples" that shows how to use MongoDB for the configuration data.

C# 6.30% JavaScript 92.48% CSS 0.15% HTML 1.07%

identityserver4.samples.mongo's Introduction

IdentityServer4 Sample for MongoDB

7_EntityFrameworkStorage-mongo: Based on Quickstart #7: Using EntityFramework Core for configuration and operational data but using MongoDB for the configuration data.

Note: In order to better support this repo moving forward, we will only maintain one quicksample based on MongoDB.

Each Sample Solution listed above is composed of:

  • IdentityServer - project based on IdentityServer4 that manages authentication
  • API - is a sample API project, used by client/* projects to showcase QuickstartIdentityServer functionality
  • clients/MvcClient - Asp .Net Core mvc client project sample
  • clients/Client - .NET Core console client project sample

Technical dependencies

  • Solution is based on Visual Studio 2019.
  • ASP .Net Core 2.2
  • Most relevant Nugets:

Running the solution

Getting one of those sample project up and running on your machine should be fairly straightforward once you have any MongoDB running.

  • If you do not have MongoDB in your environment or wish to run it locally please take a look at Setup mongo
  1. With mongo depency resolved, open the selected project in Visual Studio.
  2. Make sure you have multiple projects selected to startup - "IdentityServer", "Api" and any desired client (e.g. Clients\MvcClient) before executing solution from Visual Studio - see screenshots below:

First execution

In your very first execution you should get an exception stating that "Mongo Repository was created/populated! Please restart your website..."

This is because the first execution will automatically create a new Mongo Repository (database), but due to MongoDB.Driver limitations it is necessary to restart the solution in order to proper configure MongoDB to ignore Extra Elements such as "_id" that does not exist in IdentityServer4.Models classes.

Authentication

Once the MongoDB is created, you should see two browser tabs, one related to the MvcClient and the other related to QuickstartIdentityServer. In the Click on "Secure" menu In the the MvcClient, click on "secure", you will be redirected to QuickstartIdentityServer authentication page - it is almost identical to all original IdentityServer4.Samples, but for your convinience we took the opportunity to display a some sample user/password that were automatically added to the MongoDB.

Aditional information

identityserver4.samples.mongo's People

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.