Skip to Content
Modern API Development with Spring 6 and Spring Boot 3 - Second Edition
book

Modern API Development with Spring 6 and Spring Boot 3 - Second Edition

by Sourabh Sharma
September 2023
Intermediate to advanced
494 pages
11h 33m
English
Packt Publishing
Content preview from Modern API Development with Spring 6 and Spring Boot 3 - Second Edition

6

Securing REST Endpoints Using Authorization and Authentication

In previous chapters, we developed a RESTful web service using imperative and reactive coding styles. Now, you’ll learn how you can secure these REST endpoints using Spring Security. You’ll implement token-based authentication and authorization for REST endpoints. A successful authentication provides two types of tokens – a JavaScript Object Notation (JSON) Web Token (JWT) as an access token, and a refresh token in response. This JWT-based access token is then used to access the secured Uniform Resource Locators (URLs). A refresh token is used to request a new JWT if the existing JWT has expired, and a valid request token provides a new JWT to use.

You’ll associate users with roles ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Full Stack Development with Spring Boot 3 and React - Fourth Edition

Full Stack Development with Spring Boot 3 and React - Fourth Edition

Juha Hinkula

Publisher Resources

ISBN: 9781804613276Supplemental Content