Category Archives: C#

JSON Web Tokens (JWT)

Overview

JSON Web Tokens is an emerging standard. They are very close to their standardisation. IETF has taken care of that, and OpenID connect mandates the use of JSON Web token for all of the tokens that are exchanged in that protocol. this article gives you a little look, an overview of the purpose of security tokens, and, and what other types of tokens we have out there and where, where they are used. Then we have a look at the structure of a JSON Web Token, and then we’ll show you how easy it is to create and consume them using the Microsoft DotNet Core development framework.

Continue reading JSON Web Tokens (JWT)

Docker cribsheet

Build

Build an image from the Dockerfile in the current directory and tag the image

docker build -t myimage -f Dockerfile .

List all images that are locally stored with the Docker Engine

docker ps -a

Delete an image from the local image store

docker image rm CONTAINER_NAME

You may want to remove all orphaned images, you can do this with dandling field

docker rmi $(docker images -f dangling=true -q)
Continue reading Docker cribsheet

NET Microservices Architecture for Containerised NET Applications

I came across this guide as it is an introduction to developing microservices-based applications and managing them using containers. It discusses architectural design and implementation approaches using .NET Core and Docker containers. To make it easier to get started with containers and microservices, the guide focuses on a reference containerized and microservice-based application that you can explore. The sample application is available at the eShopOnContainers GitHub repo.

Continue reading NET Microservices Architecture for Containerised NET Applications

Async Streams

The new feature Async Streams in C# has removed the scalar result limitation and allows the async method to returns multiple results.

This change makes the async pattern more flexible so that you can retrieve data in lazy asynchronous sequence from a database or you can download data from an asynchronous sequence that returns the data in chunks when they become available.  

Continue reading Async Streams