Search results for: Spring Security

In this tutorial, I will guide you through the process of setting up a Kafka Consumer using the @Configuration class and the @Bean method. This approach offers more flexibility and control compared to using the application.properties file. Kafka consumer configuration can be achieved in two primary ways in a Spring Boot application: Using the application.properties…

Read More Kafka Consumer Configuration in the @Bean Method

You will use @MockBean annotation to create and automatically add mocks to Spring ApplicationContext. In this tutorial, we will look at different ways you can use @MockBean annotation to create mocks. If you are testing your application with JUnit and Mockito, then there are many other useful tutorials you will find on the Testing Java Code…

Read More @MockBean Annotation Example

In this tutorial, you will learn how to implement the API Gateway Lambda Authorizer in Java. You will also learn how to make Lambda Authorizer validate Authorization JWT. First, we will create an API using API Gateway then we will make lambda function as an integration point for the GET method of our resource. After…

Read More API Gateway Lambda Authorizer Example in Java

In this tutorial, we are going to learn that how we can use AWS Lambda to store user data in Amazon RDS. This tutorial is divided into three parts. Creating database using Amazon RDS. Creating Spring Boot Application. Testing Lambda function. We can refer to the following tutorials before going ahead. Build and deploy a…

Read More Using AWS lambda to store user data in Amazon RDS

In the previous blog post, we covered the basics of how to use Keycloak with Spring boot. In this blog post, we will explore Role-based Access Control to Rest API with Keycloak. So let’s get started! Imagine we have a microservice for a Research Journal Management System that can serve users with two types of…

Read More Role-Based Access Control to REST API with Keycloak

In this tutorial, we are going to see how we can use the AWS API Gateway as a trigger to an AWS Lambda function. This tutorial requires you to be familiar with building and deploying Serverless Applications with AWS Lambda. Prerequisite: Build and Deploy a Serverless Spring Boot Web Application with AWS Lambda Firstly, add…

Read More Trigger a Lambda Function Using AWS API Gateway

In this tutorial, you will learn how to get the currently authenticated principal user UserId value from the JWT access token generated by Keycloak. UserId in JWT The userId value will be stored under the “sub” key in the JWT access token generated by Keycloak. Below is an example of a decoded JWT access token containing…

Read More Get UserId from Keycloak JWT Access Token

It time to learn how to create a Web Service to authenticate user with their user name and password and how to issue a unique secure access token which our Mobile Application can use to send HTTP requests and communicate with protected web services of our API. For a free video tutorial on how to…

Read More RESTful Web Service to Authenticate User and Issue Access Token

In this blog post I am going to share with you a way to create a RESTful Web Service to: Create a new user profile, Generate and save in database a user secure user password rather than an actual password provided by user, Return back as a response a custom user profile object(JSON) with information that…

Read More RESTful Web Service to Save a New User in Database