Skip to content

Working example of locally running API secured by IdentityServer4 and being called by a client, everything runs in Docker containers

Notifications You must be signed in to change notification settings

mjarosie/IdentityServerDockerHttpsDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Identity Server running in Docker over HTTPS

This repository contains a fully working example setup of running the Identity Server protecting an example API with Client Credentials Flow.

We've got these entites involved:

  • IdentityServer4 (aka Identity Provider)
  • API
  • Client (calls the API with Client Credentials Flow)

To spin up the IdentityServer4 and the API:

  • generate self-signed developer certificates by running generate_self_signed_cert.ps1 from Powershell as an Administrator (required only once)
  • spin up IdentityServer4 and the API by runnig docker-compose up
  • in a separate console invoke the Client:
    • cd src/Client
    • dotnet run

The Client application does the following:

  • retrieves the discovery document from https://localhost:5001 (IdentityService)
  • retrieves the security token from https://localhost:5001 (IdentityService)
  • prints the content of the security token
  • calls the API https://localhost:6001 with the security token attached
  • prints the API response

About

Working example of locally running API secured by IdentityServer4 and being called by a client, everything runs in Docker containers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published