ideaport

ASP.NET Core 2.1 web app that authenticates a user against Azure AD B2C identity service using an OpenID Connect bearer token and validates an access to the web API according to the claims included in the JWT token.

Usage

Restore the application dependencies and run the Kestrel web server:

$ dotnet restore
$ dotnet run

Build a Docker image that includes the application with all of its dependencies and run the image as a container:

$ docker-compose up

Or pull the pre-built image from Docker Hub and run the image with mapping host machine’s port 5000 to the container’s published port 80:

docker pull esneko/ideaport
docker run --rm -p 5000:80 esneko/ideaport:latest

The image deployed from Docker Hub to Azure Web App for Containers is available.

Web API

Obtain a token by signing in on Azure AD B2C login page:

Email: esneko@gmail.com
Password: qwerty123$

Replace the {token} with one obtained from the link above and try to access the web API via curl:

curl http://ideaport.azurewebsites.net/api/users -i --header "Authorization: Bearer {token}"