Giter Club home page Giter Club logo

aspnetcore.identityserver4.sample's Introduction

License

Tutorials

Create New Poject

Create dotnet project

$ cd src
$ dotnet new webapi --name AspNetCore.IdentityServer4.Auth
$ dotnet new sln --name AspNetCore.IdentityServer4
$ dotnet sln AspNetCore.IdentityServer4.sln add AspNetCore.IdentityServer4.Auth/AspNetCore.IdentityServer4.Auth.csproj
$ cd src
$ dotnet new webapi --name AspNetCore.IdentityServer4.WebApi
$ dotnet sln AspNetCore.IdentityServer4.sln add AspNetCore.IdentityServer4.WebApi/AspNetCore.IdentityServer4.WebApi.csproj

Install packages

$ cd AspNetCore.IdentityServer4.Auth
$ dotnet add package IdentityServer4 --version 3.0.1
$ dotnet add package IdentityServer.LdapExtension --version 2.1.8

Update appsettings.json file

Update the following config to connect to your own OpenOLAP service.

"LdapServer": {
    "Url": "localhost",
    "Port": 389,
    "Ssl": false,
    "BindDn": "cn=admin,dc=example,dc=org",
    "BindCredentials": "admin",
    "SearchBase": "dc=example,dc=org",
    "searchFilter": "(&(objectClass=person)(uid={0}))"
  }

Run The Exist Project

Restore packages

$ cd src
$ dotnet restore

(Optional) Use Gulp to Run multple applications in the same time

You can use gulp to run Auth Serice and API Service in the same time

  1. Install package globally
$ npm install -g gulp
$ npm install -g gulp-exec
  1. Create npm link locally
$ npm link gulp
$ npm link gulp-exec
  1. Run applications
$ gulp run

or run Auth Service(auth) or API Service(webapi) individually.

$ gulp run auth
$ gulp run webapi

Run on docker

Restore packages

$ cd src
$ dotnet restore

Build the projects

  1. Auth server
$ cd src/AspNetCore.IdentityServer4.Auth
$ dotnet publish --output ../../docker/build/auth --configuration release
  1. Backend (Web API)
$ cd src/AspNetCore.IdentityServer4.WebApi
$ dotnet publish --output ../../docker/build/backend --configuration release

Build Docker images and start containers

$ cd docker
$ docker-compose build [--no-cache]
$ docker-compose up -d

Reference

aspnetcore.identityserver4.sample's People

Contributors

karatejb 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.