Categories
Java Quarkus Swagger

Handling Quarkus Security with React via Swagger

When you come to defining security in your project, there’s always two points to consider: how to secure the app, and how to handle security from a frontend(whether it’s web ui, mobile or other types).

We already created some basic API and consumed it with Swagger on your React app. It’s now time to define security and authentication method.

This article covers:

  1. Define simple JWT security on Quarkus backend
  2. Use Quarkus OpenAPI annotations to define authentication method
  3. Authenticate user from React app via Swagger

Other articles of this Series:

  1. Build, run and deploy React app with Quarkus
  2. Setting up Swagger with Quarkus and React
  3. This article
Categories
Quarkus React Swagger

Setting up Swagger with Quarkus and React

Initialize a full-stack app is an easy task. Connect two seamlessly is a bit trickier. You can call /hello endpoint without any Swagger or other libraries. But when you have, say, 20 endpoints to work with, it’s good to standardize your API calls.

This article covers:

  1. More complex than /hello REST API on Quarkus that will be used by our frontend
  2. Setup Swagger both on Quarkus and React
  3. Create Networking React class that will be used to fetch our data