<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ravishan Alahakoon on Medium]]></title>
        <description><![CDATA[Stories by Ravishan Alahakoon on Medium]]></description>
        <link>https://medium.com/@racode977?source=rss-303ac6f92056------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*wIKn1WdHMqDL10uY</url>
            <title>Stories by Ravishan Alahakoon on Medium</title>
            <link>https://medium.com/@racode977?source=rss-303ac6f92056------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 08:04:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@racode977/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Simple ASP.NET core 6 web API crud with EF core 6]]></title>
            <link>https://medium.com/@racode977/simple-asp-net-core-6-web-api-crud-with-ef-core-6-54ab6b712444?source=rss-303ac6f92056------2</link>
            <guid isPermaLink="false">https://medium.com/p/54ab6b712444</guid>
            <dc:creator><![CDATA[Ravishan Alahakoon]]></dc:creator>
            <pubDate>Mon, 30 Sep 2024 15:58:16 GMT</pubDate>
            <atom:updated>2024-09-30T15:58:16.396Z</atom:updated>
            <content:encoded><![CDATA[<p>in here i have written a simple crud example of asp.net core web api 6,</p><p>in this, small application is going to show how to add, delete ,update ,get Godzilla details.</p><p>folder structure</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/278/1*C42C3KbkxSg8UtthRd1qeQ.png" /><figcaption>folder structure</figcaption></figure><p>step 1</p><p>first,we are going to implement database connection,it has 4 steps</p><p>first we must install this Nuget packages</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*1S0Bmb8c_YzpJa1aa8Vnqw.png" /></figure><p>as second step we are going to create appDbContext class</p><p>in here don’t think about DbSet part we will discuss this few minute later</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*xMQyhvTmUHy9tqU8eVRZKw.png" /></figure><p>third step setup appsetting.json file with connection strings</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MEFAOwqn0JrrNKo_p2MzGw.png" /><figcaption>(look at connection strings)</figcaption></figure><p>fourth step is updating program.cs file</p><p>add AddDbcontext line</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*Xy2rCMBBADdp24yHd9Tn8Q.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54ab6b712444" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ASP.NET core Middleware]]></title>
            <link>https://medium.com/@racode977/asp-net-core-middleware-c6e38e02243d?source=rss-303ac6f92056------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6e38e02243d</guid>
            <dc:creator><![CDATA[Ravishan Alahakoon]]></dc:creator>
            <pubDate>Fri, 03 May 2024 11:21:23 GMT</pubDate>
            <atom:updated>2024-05-03T11:44:30.912Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we are going to talk about What middleware ,</p><p>Normally our idea is When we send a request to the backend it hits the API and gives a response but that’s not the truth, when we send an HTTP request to the back-end it first goes through the request pipeline after that hits the API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/251/1*6vxRBduFPIj0qP30L88SLA.png" /></figure><h3>What is Middleware?</h3><p>Middleware is a piece of code that helps to handle and manipulate HTTP requests and responses.</p><p>When we send an HTTP request it has to pass these middlwares before the API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*T2RKwXRYnQDdKXHSPpsPfg.png" /><figcaption>ASP.NET core 6 Middlewares in program.cs file</figcaption></figure><p>References</p><p><a href="https://www.c-sharpcorner.com/article/overview-of-middleware-in-asp-net-core/">https://www.c-sharpcorner.com/article/overview-of-middleware-in-asp-net-core/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6e38e02243d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JWT Authentication & Authorization]]></title>
            <link>https://medium.com/@racode977/jwt-authentication-authorization-b6114a067886?source=rss-303ac6f92056------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6114a067886</guid>
            <dc:creator><![CDATA[Ravishan Alahakoon]]></dc:creator>
            <pubDate>Mon, 22 Apr 2024 18:49:35 GMT</pubDate>
            <atom:updated>2024-04-23T06:05:57.010Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we are going to study What is authentication &amp; authorization and JWT Token.</p><h3><strong>Jason web token</strong></h3><p>JWT stands for Jason Web Token, JWT is used to securely transfer data between parties . Jason web token has three parts,</p><ol><li><strong>Header</strong>-this include type of the token and the signing algorithm being used</li></ol><p>2.<strong>Payload</strong>-payload contains Claims such as issuer, audience, and expiration time. claims are statements about an Entity (typically, the user) and additional data.</p><p>3.<strong>Signature -</strong>this verify the authenticity and integrity of the token</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*eoVEC6hfBn-qAKfaE8Ddfw.jpeg" /></figure><h3>Authentication &amp; Authorization</h3><p><strong>Authentication</strong> is the process of validating user credential.</p><p><strong>Authorization</strong> is the process of checking privileges for a user to access specific module in an application</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QHOEPNlYZKpu34VU3cF5AA.jpeg" /></figure><h3><strong>Authentication and authorization process</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vc_iqoBLjRmcPbaZ_611mg.png" /></figure><ol><li>The user enters user credentials(user name, password), and the request is sent to the server.</li><li>server authenticates the user and JWT token is created. the server sends the created JWT token to the client.</li><li>Browser store JWT token in browser storage.</li><li>when the user sends a request, the JWT token is sent with the HTTP request header.</li><li>The server verifies the authenticity and integrity of the token using the token signature.</li><li>If the token is valid API Process the request and sends the requested data to the client.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6114a067886" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>