Skip to content

Spring Boot application that uses WebClient and Spring Security's Oauth 2 support to access to a secured REST API. The REST API is secured using KeyCloak

Notifications You must be signed in to change notification settings

SpringSecurity-Keycloak/Spring-5-Security-OAuth-2-Client-Credentials

Repository files navigation

Logo

spring-5-security-oauth-2-client-credentials

Build Coverage Quality Gate Status Reliability Rating Security Rating Vulnerabilities

-----------------------------------------------------

➤ Tech Stack tech-stack tech-stack tech-stack tech-stack

Spring Boot application that uses WebClient and Spring Security's Oauth 2 support to access to a secured REST API. The REST API is secured using KeyCloak

-----------------------------------------------------

➤ Installing and running this project

Accompanying Blog Post

The blog post accompanying this repository is available here

Run this Spring Application

This project is best tested by running the below command

mvn clean package

This should build the project and run the testcase which uses a webclient to make a secured call to a mock api. The test case starts up two servers:

  • A mock Oauth2 service for creating tokens
  • A mock http server that acts as our api server

The testcase creates a webclient which:

  1. Invokes the mock Oauth2 server and retrieve a token
  2. Invokes the mock api server with the token and executes an REST operation on the api

About

Spring Boot application that uses WebClient and Spring Security's Oauth 2 support to access to a secured REST API. The REST API is secured using KeyCloak

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published