Go Full Stack JWT Authorization With Spring Boot and Angular

JWT Authorization and Authentication, Java, Json Web Token, Access Token vs refresh Token, MySQL, Hibernate, Maven

What you’ll learn

  • Full Stack Development with Spring Boot and Angular.
  • Spring Boot Model View Controller Structure.
  • Angular Model View Controller Structure.
  • Java Full Stack Development.

Course Content

  • Introduction –> 2 lectures • 7min.
  • Setting Up Development Environment –> 5 lectures • 11min.
  • Overview for Basic Frameworks and Tools –> 4 lectures • 16min.
  • Restful Web Services – Overview –> 3 lectures • 5min.
  • Backend –> 9 lectures • 53min.
  • Overview for Spring Security – Optional –> 3 lectures • 19min.
  • Implement Security – Spring Security –> 2 lectures • 22min.
  • JWT Implementation –> 3 lectures • 24min.
  • Refresh Token –> 4 lectures • 18min.
  • Implement User and Admin Operations –> 4 lectures • 25min.
  • Setting Up Development Environment For Client Side –> 2 lectures • 2min.
  • Overview – Client Side Frameworks –> 2 lectures • 12min.
  • Client Side (Frontend) and Server Side Integration (Backend) –> 1 lecture • 1min.
  • Client Side Implementation –> 8 lectures • 55min.
  • Structured Data – Typescript Models –> 1 lecture • 3min.
  • Form Module, FormItem, FormGroup – SignIn and SignUp Forms –> 8 lectures • 57min.
  • Guards & Guard Types –> 1 lecture • 12min.
  • Http and Observables –> 2 lectures • 9min.
  • Admin Dashboard –> 3 lectures • 15min.
  • Other Pages and Services –> 2 lectures • 11min.
  • Authorization Check –> 1 lecture • 13min.

Go Full Stack JWT Authorization With Spring Boot and Angular

Requirements

  • Basic Java knowledge.

 

 

In this course, we will create a project like an user-management-system. When I say user-management-system, we can think of it like that we will have login, register pages and users can sign-in and sign-up from those pages then we can list all users and we can see the details of users.

 

And we will implement this project using Spring Boot, Angular, and MySQL.

 

In our project, we will implement CRUD operations. These CRUD operations will be for users. We will use users for user sign-in, sign-up and authorization operations.

 

These CRUD operations will be requested from Angular. So on the backend, we will create an infrastructure for these CRUD operations and on the frontend, we will serve them with the user interface.

 

Our project goes on with User operations.

Our main operations will be user login, register, user-list etc.

Also, we will go on with the role based application. So we will use different roles like “Admin”, “User”. User role will have typical operations like login, register.

But admin role will have some specific operations like to list all users. Then we will provide different authorizations to these users according to the role.

And this all things will be provided with a secure way in both Angular and Spring Boot.

 

 

We will have two main components to implement our project.

These are server side and client side.

 

In Server Side:

 

Of course here, our main library will be Spring-boot. We will implement the whole infrastructure on the backend with the Spring boot. It will provide easy and fast configuration to us.

 

We will implement the Model view controller architecture on our project.

 

Spring-security will be one of the main topics in our application. Also, we will use JWT to provide security. Also in the JWT part, we will see the differences between access-tokjen and refresh-token.

 

In Spring Boot, Data will be presented to the client as an API call so Spring Rest Controller will be used to handle it.

 

 

We will use MySQL as Database. Because most of us are familiar with it.

 

We will also use Object Relational Mapping with Java Persistence API and Hibernate.

 

You know, We can map our database tables to objects with hibernate.

 

We will use JPA Repository and Crud Repository in Spring Boot.

So these repository templates will handle common database operations like save, update, find, delete.

 

With Spring Boot, we will also use the Lombok library to clear code.

You know that we don’t want to implement getter, setter, equals and hashcode. So we can escape it using Lombok @Data or @Value annotation.

 

We will use Maven To handle all dependencies on the server side. Actually, here we can also use Gradle. Gradle provides better performance than maven but Maven is the most common one. So we’ll go on with maven.

 

That’s all about Server side.

 

 

Let’s talk about Client Side.

 

We will create an angular application on the client side and it will provide a cool user-interface. So we will create some pages like admin dashboard, login page and register-page. Then we will assign the server apis to these pages and we will consume and produce the data from the user-interface easily and user friendly.

 

On angular, we will also implement the model view controller architecture. We will use the cool features of typescript etc.

 

Last but not least, we will implement security and authorization on angular also. We will work with different roles and according to these roles, we will implement unauthorized and not-found pages on the user interface also.

 

We will see the details of them one by one.