Written by James McDonald

June 8, 2022

I have been trying to do a Youtube video coding a CakePHP 4 with Authentication / Authorization using RequestAuthorizationMiddleware tied into CakeDC/auth RBAC

After multiple tries I’m just posting it as is. I learnt I’m not currently a video editor.

It includes

00:00 Add database and connect

04:10 Create and apply table migration

09:30 Bake Models, Views & Controllers

10:20 Authentication – Install & Configure

12:17 Encrypting passwords with Entity setter

15:59 Specify username/password identifier fields

29:07 Authorization – Install & Configure

35:00 CakeDC/auth RBAC – Install & Configure

37:00 RequestAuthorizationMiddleware

39:02 Map Cake\Http\ServerRequest to Policies

44:22 Configure permissions.php RBAC Rules

56:12 Implement AuthorizationMiddleware UnauthorizedHandler configuration array

1:02:03 Create Custom Redirect Class extending CakeRedirectHandler

1:09:36 Create AllowDebugKitPolicy to enable DebugKit when logged in as a restricted user and stop double Flash message

1:20:16 Implement CakeDC/auth Owner class to allow author to edit/delete own posts


Submit a Comment

Your email address will not be published.

You May Also Like…

MacOS USB Creator

Just toasted my Windows 10 Pro install with a Windows 11 upgrade. Think it will be unrecoverable (because of Bitlocker...