Coder Social home page Coder Social logo

bassemmamar / identityserver4demo Goto Github PK

View Code? Open in Web Editor NEW
2.0 0.0 2.0 1.39 MB

Basic example describe how to use IdentityServer4 to authenticate clients and secure resources

Home Page: http://docs.identityserver.io/en/release/quickstarts/0_overview.html

C# 96.19% CSS 3.62% JavaScript 0.19%
identityserver4 asp-net-core

identityserver4demo's Introduction

Identityserver4Demo

a very basic example discribe how to use Identityserver4 based on Identityserver4 » Docs » Setup and Overview

Structure

  1. AuthServer

    • An ASP.NET core application
    • Has Identityserver4 installed on and register resourses (ApiResource or IdentityResources), clients and users
    • Support External Authentication like Google
    • Support User Authentication with OpenID Connect, depend on Quickstart UI repo
    • Self-hosted in the port 5000
  2. APIDemo

    • An ASP.NET core Web API application
    • Has an api controller which is used to test the authorization requirement, as well as visualize the claims identity through the eyes of the API
    • Has 'IdentityServer4.AccessTokenValidation' installed to validate JWT and reference tokens from IdentityServer4
    • Self-hosted in the port 5001
  3. ClientDemo

    • An ASP.NET core Console application
    • This client is used to requests an access token, and then uses this token to access the API
    • Has 'IdentityModel' installed to encapsulates the OAuth 2.0 protocol interaction in an easy to use API.
    • Contain an example how to use client with GrantTypes ClientCredentials, and another one to use client with GrantTypes ResourceOwnerPassword
  4. WebAppDemo

    • An ASP.NET core MVC application
    • This client is used to represent User Authentication with OpenID Connect
    • You can navigate to Cliens view which is Authorized by Identityserver4
    • You can login using test users {Username = "alice",Password = "password",} or {Username = "bob",Password = "password",} or by your google account
    • You can do logout to delete Cookies

Tests Cases

  1. First test case

    • Run AuthServer
    • Run APIDemo
    • Run ClientDemo
  2. Second test case

    • Run AuthServer
    • Run WebAppDemo

identityserver4demo's People

Contributors

bassemmamar avatar

Stargazers

 avatar  avatar

Forkers

cdoru jangocheng

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.