Skip to content

cassidyRonan/ASPNet-API-Key

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Key Implementation for ASP Net Core

API Key Middleware

Contained in this repository is an example of implementing API Key Authentication through middleware. However this example applies the API Key Authentication to all of the API actions.
API Key Attribute Definition

API Key Action/Class Attribute

Contained in this repository is an example of implementing API Key Authentication through attributes. This attribute can be applied at both the class and method levels as [APIKey].
API Key Attribute Definition API Key Attribute on Class API Key Attribute on Action

Definition of Single API Key

The API Key is defined in the appsettings.json file as APIKey.
Definition of API Key

Example API Request

Postman Request

About

Exploration of implementing API Key functionality

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages