Posts

Jasper report integration in Spring boot/Spring MVC.

Image
Hi folks,                   Here we came up with another interesting poc, which is the necessity of almost every project when its come to reporting. Jasper reporting is one of the powerful and secure reporting tool available in market.                 In this blog post we are leveraging the power of it to generate a pdf/html report with dynamic data populated by the backend and making the generated report as a downloadable form on the client.  Before we deep dive into coding part, let me set up the context of POC application.  We are creating a Spring Boot starter web project with dependency of jasper and jstl.  We are using a few UI cdn libraries to render UI and make backend call from UI.  Then after we will hit rest API from UI and get downloadable report into browser/client. Here are the pom dependencies. Pom.xml <?xml version="1.0" encoding="UTF-8"?...

Implementing google 2-FA authenticator in Spring Boot

Image
                                   Welcome geeks to my brand new blog. Today we are going to perform a basic POC, in which we will set up a basic google 2FA authentication in spring boot.      Before actually jumping into implementation let's try to understand what is 2FA and why we need this. So Basically 2FA stands for Two Factor Authentication. It's a randomly generated time-based password for accessing web apps. ''2FA, or two-factor authentication, is an identity verification method that requires a user to provide a second authentication factor in addition to a password or two authentication factors instead of a password in order to access a website, application or network.'' See the below diagram for a better understanding of how it works behind the scene.           There are multiple vendors in the market who provides such services a...

Git 403: unable to access 'https://github.com/username/location.git/': The requested URL returned error: 403

Image
 Hi Geeks,        Hope you are doing well. Recently I was working on one of my projects and I came across a situation, where I'm getting 403 authentication-related errors while pushing my code to one of my public repositories.         Here are some pointers I would like to highlight the repo is public, so everyone can access it. But still, it is throwing 403 unauthorized exceptions while pushing code to the remote repo. Below is the step to simulate the above scenario. Step 1: Created an empty repo on a remote git hub account. Step 2: Initialise an empty repo locally or clone the above repo on the local machine. Step 3: Add the above repo as the remote origin to the local git Step 4: Added local changes to the stage area and try to make a push to the remote repo. As you can see in step 4 we are getting 403 permission-denied errors. The solution to the above issue. Step 1: Create Personal Access Token on GitHub  Log in to your ...

Xero Developer account setup with REST API auth flow.

Image
 Hi folks,     Welcome to my new blog post. Recently I was working on one of the accounting management third-party vendors named XERO with rest integration.  Below is a statement about Xero from their official website.  We help small businesses thrive worldwide  Xero’s online accounting software connects small business owners with their numbers, their bank, and advisors anytime. Let's get started with setting up our developer account first. We need to create one account at  https://developer.xero.com/ . You can start your 30 days free trial account in just minutes by providing some of the basic details. there is some capping on the number of connections and number of requests in the trial account. After signing up verify your account and set a login password, better to add 2-step authentication as well. Creating app under developer account. Once you successfully log in, you need to create your app under my apps. While creating a new app you n...