Keycloak

In this tutorial, you will learn how to download and start up Keycloak as a standalone server. What is Keycloak? Keycloak is an open-source identity and access management tool focusing on modern applications and services such as mobile applications, REST APIs, and single-page applications. How to Download Keycloak? To download the Keycloak go to the…

Read More Keycloak: Starting a Standalone Server

In the previous blog post, we have covered how to grant access to certain endpoints based on the Role configured through code. As we know, Keycloak is the Identity and Access Management solution that provides out-of-the-box authentication and authorization services. One of the services includes a Fine-Grained Authorization Service. Fine-Grained Authorization Service provides businesses with…

Read More Fine-grained Authorization Services in Keycloak with Spring Boot

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

This tutorial will teach you how to use Keycloak to secure your Spring Boot Application. To find other tutorials, check the Keycloak tutorials page. What is Keycloak? According to Keycloak’s  official website, It is an open-source Identity and Access Management solution aimed at modern applications and services. It makes it easy to secure applications and…

Read More A Guide to use Keycloak with Spring Boot

In this short tutorial, you will learn how to configure the /logout functionality in your Spring Boot Web application that uses OAuth2 Social Login. To learn how to implement the OAuth2 Social login feature, please check the following tutorial: Spring Security OAuth 2 Social Login. Configure HttpSecurity Applications that use Spring Security and OAuth2 Social login…

Read More Spring Security OAuth 2 Social Logout

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

In this tutorial, you will learn how to register a new OAuth Client application with Keycloak and how to request an access token using the Client Credentials grant type. If you are interested to learn how to perform other OAuth 2 authorization flows with Keycloak, then have a look at the following tutorials as well.…

Read More Keycloak: Client Credentials Grant Example

In this tutorial, you will learn how to create a new OAuth Client application in Keycloak. If you are interested to learn more about Keycloak and how to perform different OAuth 2 authorization flows using the Keycloak server, then have a look at other Keycloak tutorials as well. Creating a New OAuth Client Application To…

Read More Keycloak: Create a New OAuth Client Application

In this tutorial, you will learn how to perform PKCE verification when acquiring an access token using the OAuth 2 Authorization Code Grant flow. PKCE stands for Proof Key for Code Exchange and the PKCE-enhanced Authorization Code Flow builds upon the standard Authorization Code Flow, so the steps are very similar. To learn how to acquire…

Read More PKCE Verification in Authorization Code Grant

In this tutorial, you will learn how to get an access token from the Keycloak authorization server using the OAuth Authorization Code Grant flow. You should use this authorization flow only if your application support redirects. For example, if your application is a Web application or a mobile application, then this authorization grant flow is…

Read More Keycloak: Authorization Code Grant Example