Learn how to add resource owner authorities to a JWT access token in the Spring Authorization Server.
Also find me here:
Baeldung Author
Hamid Reza Sharifi
I’m an experienced Software Engineer with a demonstrated history of working in the computer software industry. I received my Ph.D. degree in Computer Software Engineering from Islamic Azad University, Science And Research Branch in 2018. Over the past few years, I have been working mainly on projects built around Java, Spring Boot, Agile Methodologies, REST API, Microservice, and Keycloak IAM. Also, I’m very interested in learning new technologies and the latest practices in the industry.
Here's what I've written (so far):
Baeldung on Java
- All
- Security (8)
- Spring Boot (7)
- Spring Security (4)
- Spring (2)
- REST (2)
- Logging (2)
- Java IO (2)
- Architecture (2)
- Testing (1)
- Spring Web (1)
- Spring Data (1)
- Spring Cloud (1)
- Maven (1)
- Java (1)
A Guide to OpenRewrite
Filed under Maven
Learn the basics of the OpenRewrite, a library to for managing Maven dependencies.
Extract CN From X509 Certificate in Java
Filed under Security
Learn several approaches to extracting the CN value of a certificate file.
Securing Spring Boot API With API Key and Secret
Filed under Spring Boot, Spring Security
A quick and practical guide to securing Spring Boot APIs with API keys and secrets.
Introduction to Spring Modulith
Filed under Architecture, Spring Boot
A quick and practical guide to Spring Modulith.
Custom Protocol Mapper with Keycloak
Filed under Security
A quick and practical guide to using custom protocol mappers with Keycloak.
Spring Boot Logback and Log4j2 Extensions
Filed under Logging, Spring Boot
A quick and practical guide to Spring Boot and its logging extensions.
Running Spring Boot Applications with the Embedded Camunda Engine
Filed under Spring Boot
Learn how to leverage the embedded Camunda engine into the Spring Boot application.
Get Information About a PDF in Java
Filed under Java IO
Learn different ways of getting information about a PDF file using the iText and PDFBox libraries in Java.
Multitenancy With Spring Data JPA
Filed under Architecture, Spring Data
Building a multi-tenant system in Spring requires keeping data from one tenancy apart from another. We look how to separate requests into different databases by tenant, and how to validate that the requests belong to the correct tenancy.
Get Keycloak User ID in Spring
Filed under Spring Security
Learn to get the Keycloak user ID in a Spring Boot application.
Single Sign On Solutions for Java Applications
Filed under Security
Learn about some common single sign-on solutions for Java applications.
Provide an OAuth2 Token to a Feign Client
Filed under Security, Spring Cloud
Learn to provide an OAuth2 token to a feign client.
Failed to Load ApplicationContext for JUnit Test of Spring Controller
Learn about the “Failed to Load ApplicationContext” error message when running Junit tests with the Spring Controller, and how to fix it.
HMAC in Java
Filed under Security
Learn how to work with the HMAC algorithm in Java.
Writing Log Data to Syslog Using Log4j2
Filed under Logging, Spring Boot
Learn to write log data to Syslog using Log4j2 and Spring Boot.
Swagger @Api Description Is Deprecated
Filed under REST
Learn alternatives to the deprecated description attribute with Swagger 2 and OpenAPI 3.
Getting the Java Version at Runtime
Filed under Java
Learn to find the Java version at runtime.
TLS Setup in Spring
Learn how to set up TLS in Spring.
Get All Endpoints in Spring Boot
Filed under REST, Spring Boot
Learn to find all endpoints for a Spring Boot REST application.
Insert a Row in Excel Using Apache POI
Filed under Java IO
Learn how to inser a new row between two rows in an Excel file using the Apache POI library
Prevent Cross-Site Scripting (XSS) in a Spring Application
Filed under Spring Security
When writing a web service in Spring we need to create a custom filter in order to protect our services from cross-site scripting attacks. We explore how to achieve this using ESAPI and Jsoup.
InvalidAlgorithmParameterException: Wrong IV Length
Filed under Security
In this tutorial, we’ll describe how to avoid InvalidAlgorithmParameterException when we generate the IV and use it in a cipher algorithm.
Java AES Encryption and Decryption
Filed under Security
Learn how to implement AES encryption and decryption using the Java Cryptography Architecture.
DispatcherServlet and web.xml in Spring Boot
Filed under Spring Boot, Spring Web
Learn how to migrate code from a web.xml file to DispatcherServlet in a Spring Boot application.
Baeldung on Linux
- All
- Networking (2)
- Security (1)
- Processes (1)
- File Permissions (1)
Listing All DNS Records in a Domain Using dig
Filed under Networking
A quick and practical guide to using dig for listing all DNS records in a domain.
Configuring DNS in the resolv.conf File
Filed under Networking
Learn multiple ways to configure DNS in Linux.
Change Permissions for a Folder and All Its Content in Linux
Filed under File Permissions
Learn to change permissions for a folder and all its content in Linux.
Get Process ID of Linux Foreground and Background Processes
Filed under Processes
Learn to find the process ID of Linux foreground and background processes.
HTTPS Connection Using Curl
Filed under Security
Learn to make an HTTPS connection using curl.