How to do it...

This recipe creates the custom-claims-jwt project, which is available on GitHub in the Chapter05 folder. Import the generated source code as a Maven project into your IDE and follow the following steps:

  1. Open the pom.xml file and add the following extra dependencies for Spring Security OAuth2 and Spring Security JWT in the same way we did for the Authorization Server project:
<dependency>  <groupId>org.springframework.security.oauth</groupId>  <artifactId>spring-security-oauth2</artifactId>  <version>2.2.0.RELEASE</version><!--$NO-MVN-MAN-VER$--></dependency><dependency>  <groupId>org.springframework.security</groupId>  <artifactId>spring-security-jwt</artifactId></dependency>
  1. As we are going to use an in-memory database to simplify ...

Get OAuth 2.0 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.