Skip to main content

Authorization

Learn Authorization (Spring MVC Security Integration, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes Authorization decides what an authenticated user is allowed to do, for example who may open /admin or delete an order. Authorities and roles : a role is an authority with the prefix ROLE_ , so hasRole("ADMIN") checks for ROLE_ADMIN . Two levels : URL rules in authorizeHttpRequests and method rules with @PreAuthorize .

More lessons in Spring MVC Security Integration