When building your application's security features, you can basically use two approaches: programmatic security and declarative security:
- The programmatic approach is when you define the security policy of your application using code.
- The declarative approach is when you do it by declaring the policies and then applying them accordingly.
This recipe will show you the declarative approach.