Posts

Google reCAPTCHA using HttpClient in ASP.NET

Image
Introduction reCAPTCHA   is a free service that protects your site from spam and abuse. It uses advanced risk analysis techniques to tell humans and bots apart. With the new API, a significant number of your valid human users will pass the  reCAPTCHA  challenge without having to solve a  CAPTCHA . Building The Code Before you start, visit this link  https://www.google.com/recaptcha/intro/index.html  and click on the Get  reCAPTCHA  button and follow the steps. Let's Get started  Step 1 : Create a class or a method in your controller and add the code below.             public async Task<string> GetRecaptcha()         {             var response = HttpContext.Current.Request["g-recaptcha-response"];             const string secretKey = "your secret key";       ...

Solved: Jwt Authentication in Asp.Net Web Api And Mvc

Jwt in Asp.Net Web API And MVC Introduction Token based security is trending everywhere in today’s security architecture. There are different token providers out there, but the one people are more familiar with is the JWT token. The token identifies a user. For example, your ID card could be used as a token. It identifies who you claim to be. The Id card would contain information like: ·         Firstname ·         Lastname ·         Age ·          Title The JSON Web Token The JSON Web Token contains some header information, a signature, and the token’s claims. In plain text, the claims might look like this: { "Name":"John doe", "UserId":5, "Email":"johndoe@gmail.com", "Role":"Boss" } The token header is used to specify some other things like signature algorithm, expiration date, the name of the issuer, and a few other attributes. Using Jwt In Asp.Net Web API The JwtA...

Paystack In Asp.Net MVC

Introduction Happy new year folks. I hope you all enjoyed your holidays.  Let me enlighten you with some new year codes 😊. Remember my post on how to implement a payment gateway on Paystack with Node js ? today, you would see it in action in Asp.Net . I am not going to build a customer subscription app like I did in the previous one, rather I would provide explicit codes that can be used to implement payment on any mobile apps, web apps, and any platform indeed. It is a simple code and can be easily integrated into your projects. To know more about Paystack infrastructure, visit the developer's section on their website. They have already written some libraries on vast programming languages like Python , Java , Node js and so on... If you have problems working with the code or implementing it on your project, drop your comments and you might receive an email from me or if your company is looking forward to incorporating a payment solution, you can contact me. Diving t...