#basicauthentication #asp.netcore #authentication
This video explains basic authentication in ASP .NET Core Web API
Steps need to be proceed
======================
1, Add UseAuthentication in startup.cs
2, Create Authentication handler
3, implement the handler using AuthenticationHandler with AuthenticationSchemeOptions
4, Add Required namespace
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.Options;
using Microsoft.Extensions.Logging;
using System.Text.Encodings.Web;
5, Get Authorization header using AuthenticationHeaderValue
6, Inject the DB Context to the handler
7, Access the user table validate the credentials if all matched
8, Create Ticket & return the response
Code for create Ticket
==================
var claims = new[] { new Claim(ClaimTypes.Name, _userinfo.Userid) };
var identity = new ClaimsIdentity(claims, Scheme.Name);
var principal = new ClaimsPrincipal(identity);
var ticket = new AuthenticationTicket(principal, Scheme.Name);
Url for Encoding
===============
https://www.base64encode.org/
Auf dieser Seite können Sie das Online-Video ASP .NET Core Web API - Basic Authentication + Entity Framework in Tamil || nihira techiees mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Nihira Techiees 06 Januar 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 3,889 Mal angesehen und es wurde von 57 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!