Interceptors, guards, RBAC and backend authorization
Learn Interceptors, guards, RBAC and backend authorization (Module 16 · Authentication and Security, Angular) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Doorman, bouncer and the real vault Imagine a bank. The interceptor is the clerk who stamps every request slip with your ID. A route guard is the sign on a door saying "Staff only": it saves honest people from wandering in. But the backend authorization is the vault itself, which checks your key every time. Important note: route guards are not a substitute for backend authorization. Anyone can open DevTools, edit JavaScript or call your API with curl. The Spring Boot APIs must enforce permissions independently on every endpoint ( @PreAuthorize , hasRole ). Guards and hidden buttons only...