https://github.com/markstory/cakefest2023-workshop
Code for workshop to be given at cakefest 2023
https://github.com/markstory/cakefest2023-workshop
Last synced: 2 months ago
JSON representation
Code for workshop to be given at cakefest 2023
- Host: GitHub
- URL: https://github.com/markstory/cakefest2023-workshop
- Owner: markstory
- Created: 2023-07-22T19:12:49.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-19T03:40:28.000Z (10 months ago)
- Last Synced: 2025-03-18T21:52:25.347Z (2 months ago)
- Language: PHP
- Size: 668 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CakeFest 2023 workshop
The source code for the workshop given at Cakefest 2023
## Branches
This repository has several branches for the various stages of my workshop:
- `master` Contains a basic CakePHP 5 demo.
- `authentication-authorization` Contains a simple application with
authentication and authorization setup.
- `sudomode-complete` Contains the completed sudo-mode application.
- `webauthn-complete` Contains the completed webauthn/passkeys application.## Installation
1. Download [Composer](https://getcomposer.org/doc/00-intro.md) or update `composer self-update`.
2. Run `php composer.phar install`.If Composer is installed globally, run
```bash
composer install
```You can now start the CakePHP development server with:
```bash
bin/cake server -p 8765
```
Then visit `http://localhost:8765` to see the welcome page.### mkcert & stunnel
For the webauthn example, the application needs to be behind a TLS webserver.
The cakephp dev server can't do TLS, so I'm using a pair of CLI utilities you
can generate an HTTPs proxy for the cakephp dev server. I found this pretty
simple to use on linux.Generate certificates for your local machine using `mkcert`
```bash
mkcert localhost
cat localhost.pem localhost-key.pem > localhost-bundle.pem
chmod 0666 *.pem
```This will generate certificate & key file. Create the bundled certificate
for `stunnel`Then in one terminal, run: `bin/cake server` and then in another run
```bash
sudo stunnel3 -f -d 443 -r 8765 -p ./localhost-bundle.pem
```## Configuration
Read and edit the environment specific `config/app_local.php` and set up the
`'Datasources'` and any other configuration relevant for your application.
Other environment agnostic settings can be changed in `config/app.php`.