Skip to content

default-kaas/Simple-api-gateway-structure

Repository files navigation

Explantation

This repository includes two .Net 6 projects.

One project is a simple api gateway which handles the authorisation and authentication.

The second project is a simple authentication service, which includes the following end points:

  1. Authenticate => this endpoint will return a JWT if the correct login credentials are given
  2. Get permission-route1 => If you have the role claim 1 you will recieve a response with => You have permission for route 1
  3. Get permission-route2 => If you have the role claim 2 you will recieve a response with => You have permission for route 2
  4. Get permission-route3 => If you have the role claim 3 you will recieve a response with => You have permission for route 3

Read the code in VSCode online

VSCode

Installation

.Net 6 SDK

SDK location

Visual studio 2022

Visual studio 2022

Postman

Postman

Setup

  1. Import the postman JSON API end-points into postman
  2. Import the postman JSON ENV values into postman
  3. Run both applications
  4. Send a get request to Permission route1 => should receive a 401
  5. Send a post request to Authenticate => should receive a 200
  6. Send a get request to Permission route1 => should receive a 200
  7. Send a get request to Permission route3 => should receive a 403

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published