Explain CherryPy Tools for Authentication and Authorization.
CherryPy Tools for Authentication and Authorization :
CherryPy offers built-in tools and decorators that aid in implementing authentication and authorization:
* cherrypy.lib.auth_basic
: Provides basic HTTP authentication.
* cherrypy.lib.sessions
: Can be used for session-based authentication.
* @cherrypy.tools.auth_basic
: Decorator to protect endpoints with basic authentication.
* @cherrypy.tools.authorize
: Decorator to enforce authorization checks on endpoints.