HEJA coding people, I hope you're well.
CONTENT
Learn how to secure individual Spring Boot methods using Spring Security and the @PreAuthorize annotation.
In this coding session, I’ll demonstrate method-level authorization with a Spring Boot application containing two protected REST API endpoints. We’ll test different user roles and credentials with Postman, then walk through the Maven dependencies, controller annotations, and security configuration.
WHAT YOU’LL LEARN
Understand method-level security in Spring Boot
Use `@PreAuthorize` to restrict access by role
Enable method security in the Spring Security configuration
Protect individual REST API endpoints
Test authenticated and unauthorized requests with Postman
Understand the difference between authentication and authorization
TIMESTAMPS
00:00 Introduction | Coding Session 20
00:05 Spring Security documentation
00:27 Test the secured REST API with Postman
01:13 Code walkthrough
01:14 Maven dependencies
01:37 Protect endpoints with `@PreAuthorize`
02:15 Spring Security configuration
02:55 Review the tests and implementation
03:58 Questions and comments
04:38 More coding sessions
Follow along to see what comes next. / @codingwithbibbobbib
TOOLS
Intellij IDEA Community Edition, postman
TECHNOLOGIES
Spring Framework 3.2.5, Spring Boot, Spring Security, maven, java 17 .
TIPP CODING SESSIONS
Mocking API Data with Examples In Postman: • How to Create a Mock Server in Postman | C...
MUSIC
licensed with Epidemic Sound
https://www.epidemicsound.com
#codingwithbibbobbib, #restapi, #springsecurity, #coding #howto, #codingsession, #springboot #springboottutorial, #bibbobbib
On this page of the site you can watch the video online Spring Boot Method Security with @PreAuthorize | Coding with BibBobBib with a duration of hours minute second in good quality, which was uploaded by the user Coding With BibBobBib 11 May 2024, share the link with friends and acquaintances, this video has already been watched 506 times on youtube and it was liked by 7 viewers. Enjoy your viewing!