- [OpenLDAP] Create an OpenLDAP container
- [ASP.NET Core] Identity Server 4 - Concepts
- [ASP.NET Core] Identity Server 4 – LDAP authentication
- [ASP.NET Core] Identity Server 4 – Secure WebAPI
- [ASP.NET Core] Identity Server 4 – Custom EventSink
- [ASP.NET Core] Identity Server 4 – Refresh Token
- [ASP.NET Core] Identity Server 4 – Role based authorization
- [ASP.NET Core] Identity Server 4 – Policy based authorization
- [ASP.NET Core] Identity Server 4 – Dockerize
- [ASP.NET Core] Identity Server 4 – Client Credential
$ 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
$ cd AspNetCore.IdentityServer4.Auth
$ dotnet add package IdentityServer4 --version 3.0.1
$ dotnet add package IdentityServer.LdapExtension --version 2.1.8
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}))"
}
$ cd src
$ dotnet restore
You can use gulp to run Auth Serice and API Service in the same time
- Install package globally
$ npm install -g gulp
$ npm install -g gulp-exec
- Create npm link locally
$ npm link gulp
$ npm link gulp-exec
- Run applications
$ gulp run
or run Auth Service(auth
) or API Service(webapi
) individually.
$ gulp run auth
$ gulp run webapi
$ cd src
$ dotnet restore
- Auth server
$ cd src/AspNetCore.IdentityServer4.Auth
$ dotnet publish --output ../../docker/build/auth --configuration release
- Backend (Web API)
$ cd src/AspNetCore.IdentityServer4.WebApi
$ dotnet publish --output ../../docker/build/backend --configuration release
$ cd docker
$ docker-compose build [--no-cache]
$ docker-compose up -d