Table of Contents Introduction Prerequisites Project Setup Install okta-auth-js Service Auth Service Token Service Auth Guard Components Implementing Okta Auth Role Based Access Environment Variables App Modules Routing Module Token Service Auth Service Auth Guard Expired Component Unauthorized Component Login Component App Component Dashboard Component Protected Component Update Page Testing Okta SSO Role Based Access…

Posted in Angular

Angular Okta SSO Role Based Access

Table of Contents Introduction Why Does 404 Error Occur Solution Introduction Here in this tutorial I am going to show you how to redirect to context path for 404 error in Angular Spring Boot application. Context path basically is the same path for home page or root URL. It is assumed that your frontend application…

Posted in Angular Spring Boot

Redirect To Context Path For 404 Error In Angular Spring Boot

Introduction Here I am going to tell you how to setup multiple environments for Angular applications. Multiple environments are required for your Angular application when you want to ensure the stability and integrity of the application when it goes live on the production environment where your application’s end users access it. Your application’s development workspace…

Posted in Angular

How To Setup Multiple Environments For Angular Applications

Problem Let’s say you are starting your Spring Boot application and your (Spring Boot) application is trying to connect to vhost (virtual host) ‘xyz’ that does not exist in RabbitMQ server. So, you are getting error – access to vhost ‘xyz’ refused for use ‘guest’. By default, the user which is used to connect to RabbitMQ is ‘guest’….

Posted in RabbitMQ

RabbitMQ – access to vhost ‘xyz’ refused for user ‘guest’

What is integrity attribute? You might have seen the integrity attribute as well as crossorigin attribute in web page source code. The integrity and crossorigin attributes are used in the <script> and <link> tags. This is also called subresource integrity because it is included into the third party resources which are parts of the HTML…

Posted in CSS HTML JavaScript jQuery

HTML Script Integrity Attribute – SubRresource Integrity (SRI)

Problem Here I am going to tell you how you can solve the problem when you try to run Java main class in Spring Boot application from IntellijIDEA. The actual error you would find as given below:

Posted in Intellij

Intellij IDEA Error – Command Line Is Too Long

Introduction Here I am going to tell you how to use proxy server and timeout with Spring Boot RestTemplate API. If you are running your application behind a proxy server then you need to connect to REST API through proxy server and without proxy server connection you may face connection timeout error or other errors. Remember if…

Posted in Spring Boot Spring REST

Spring RestTemplate With Auth Token, Proxy and Timeout

Introduction I am going to show you how to exclude dependency from build.gradle script in gradle based Java project. Specially when you use several starter dependencies in your Spring Boot project, then many children dependencies are found and hence many libraries are downloaded in the project’s classpath. These many libraries may not be needed for your project and you may want to exclude these…

Posted in Gradle

How To Exclude Dependencies In Gradle Based Java Project

Introduction In this example, I am going to show you how to find dependency hierarchy using gradle build tool in your Java based projects. Your Spring Boot projects might be using gradle build tool and you want to check what dependencies are used in your project. You can easily find what libraries are used in your project by looking…

Posted in Gradle

Find Dependency Tree Hierarchy In Gradle Based Java Project

Introduction In this example I am going to show you how to call REST APIs using javax.net.ssl.HttpsURLConnection. So, I am using plain Java code to send or receive data to or from the REST APIs. I am also going to show you how to send authentication token in the HTTP header. I am also going to…

Posted in Java REST

HttpsUrlConnection REST API Call – Auth Token And Proxy Server

Introduction In this tutorial I am going to show you how to build Spring Boot Angular CRUD Application. CRUD is an acronym and stands for Create, Read, Update and Delete operations performed through an application or APIs. Using Spring Boot application I will build REST APIs which will be used to perform CRUD operations on…

Posted in Angular Spring Boot Spring JPA Spring REST

Angular Spring Boot REST API CRUD Example

Introduction Here I am going to show you how to build an application using Angular for authenticating a user using Okta SSO (Single Sign On) with PKCE. Okta is an enterprise level identity provider that helps you to enable Single Sign-On across applications within an enterprise. Angular is a single page application (SPA) and it…

Posted in Angular

Angular Okta SSO (Single Sign On) with PKCE