Posts

Showing posts from August, 2019

Azure Active Directory Authentication to an API using ASP.NET Web Application and API using ASP.NET Core Web Application in Visual Studio 2019

Image
How does Azure Active Directory Authentication work?   Step 1:  Log in to Azure Active Directory Step 2: Successful Azure Active Directory returns an access token Unsuccessful Azure Active Directory will deny you access Step 3: From your application you make a http request with the access token in the headers to the API The API receives this token and goes to Azure Active Directory to check if this token is authorised. Step 5: Successful If the API finds that the token is valid then you are granted access to the API and can use its methods such as GET< POST< PUT and DELETE Unsuccessful If the API finds that the token is invalid then you will be denied access to the API and will get a 401 unauthorised. How to create an azure active directory authentication API using ASP.NET CORE Web Application with an Android demonstration Step 1: API in Visual Studio Creating the API 1a. In Visual Studio select "ASP.NET Core Web Application" and press crea...

Understanding the basics of REST API with HTTP and JSON

Image
What is an API? The Messenger  API stands for Application Programming Interface.The API is the messenger that takes REQUESTS and tells the system what you want to do and returns a RESPONSE back to you. This allows two pieces of software to communicate with each other. Metaphor example: Waiter at a restaurant gets the REQUEST from customer and tells the Kitchen what to do and then delivers the RESPONSE back to the customer. One of the most popular types of API is REST or, as they’re sometimes known, RESTful APIs. What is REST ? Let us use HTTP requests to format those messages  The short answer is that REST stands for Representational State Transfer. Architecture style for designing network applications which are are stateless, meaning that the server does not need to know anything about what state the client is in and vice versa. In other words REST is a set of rules/standards/guidelines that follow the REST specification, basically governs the behaviour of clients a...