Asmak9.AuthorizeRESTWebApiAK Library

Asmak9.AuthorizeRESTWebApiAK is a 30 days free trial library that provides two main classe RESTWebAPIAuthHeaderHandler and RESTWebAPIKey for REST Web API basic authorization and API Key generation facility. You can install this library via Nuget package and enjoy 30 day free trial. You can use this library into your any ASP.NET REST Web API project with .NET 4.8 or above framework. REST Web API authorization i.e. apiKeyName, apiKeyValue, username, password and licensKey (By Default empty) can be set via RESTWebAPIAuthHeaderHandler. In order to generate API Key, create your unique password and saltKey first then pass this information to RESTWebAPIKey class GenerateApiKey(...) method, this method wil return your API key.

Basic Usage for RESTWebAPIKey class

using Asmak9.AuthorizeRESTWebApiAK;

// Initialization.
string myPassword = "mypassword";
string mysaltKey = "mysaltkey";

// Generate API key.
string apiKey = RESTWebAPIKey.GenerateAPIKey(myPassword, mysaltKey);

Basic Usage for RESTWebAPIAuthHeaderHandler class

Use below code in your project Global.asax.cs file i.e.

using Asmak9.AuthorizeRESTWebApiAK;

// Initialization.
RESTWebAPIAuthHeaderHandler authRegObj = new RESTWebAPIAuthHeaderHandler("myapiKeyName", "myapiKeyValue", "myusername", "mypassword");

// API authorization registration.
GlobalConfiguration.Configuration.MessageHandlers.Add(authRegObj);

Examples

  1. Generate API Key
  2. ASP.NET REST Web API Basic Authorization



Like, Share, Support, Subscribe!!!

E-Store Bytezaar: https://www.bytezaar.com/