From 0152db25e9b3a35004d7a4e0fd97559002d9da78 Mon Sep 17 00:00:00 2001 From: Dave Smith-Hayes Date: Sat, 11 May 2024 21:40:16 -0400 Subject: [PATCH] Fix the comma, and add Shield for auth. --- .gitignore | 1 + app/app/Controllers/Pages.php | 2 +- app/composer.json | 3 +- app/composer.lock | 130 +++++++++++++++++++++++++++++++++- 4 files changed, 133 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e702d18..d969596 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .idea app/node_modules +app/vendor diff --git a/app/app/Controllers/Pages.php b/app/app/Controllers/Pages.php index 1361e23..12309b1 100644 --- a/app/app/Controllers/Pages.php +++ b/app/app/Controllers/Pages.php @@ -21,6 +21,6 @@ class Pages extends BaseController 'title' => ucfirst($page) ]; - return view('pages/', $page, $data); + return view('pages/' . $page, $data); } } diff --git a/app/composer.json b/app/composer.json index 0b3a889..cfa7cbd 100644 --- a/app/composer.json +++ b/app/composer.json @@ -11,7 +11,8 @@ }, "require": { "php": "^8.1", - "codeigniter4/framework": "^4.0" + "codeigniter4/framework": "^4.0", + "codeigniter4/shield": "^1.0" }, "require-dev": { "fakerphp/faker": "^1.9", diff --git a/app/composer.lock b/app/composer.lock index 1942214..d70b00b 100644 --- a/app/composer.lock +++ b/app/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "657ac079313fab046eb8c29fe1d6992b", + "content-hash": "9ea44c5babadf1d51e15a130dafc557f", "packages": [ { "name": "codeigniter4/framework", @@ -80,6 +80,134 @@ }, "time": "2024-04-14T04:18:29+00:00" }, + { + "name": "codeigniter4/settings", + "version": "v2.2.0", + "source": { + "type": "git", + "url": "https://github.com/codeigniter4/settings.git", + "reference": "2748f2b4572d44a940f98c31847d65272cac5666" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/codeigniter4/settings/zipball/2748f2b4572d44a940f98c31847d65272cac5666", + "reference": "2748f2b4572d44a940f98c31847d65272cac5666", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "codeigniter4/devkit": "^1.1.2", + "codeigniter4/framework": "^4.2.3", + "rector/rector": "0.18.13" + }, + "type": "library", + "autoload": { + "psr-4": { + "CodeIgniter\\Settings\\": "src" + }, + "exclude-from-classmap": [ + "**/Database/Migrations/**" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lonnie Ezell", + "email": "lonnieje@gmail.com", + "role": "Developer" + } + ], + "description": "Settings library for CodeIgniter 4", + "homepage": "https://github.com/codeigniter4/settings", + "keywords": [ + "Settings", + "codeigniter", + "codeigniter4" + ], + "support": { + "issues": "https://github.com/codeigniter4/settings/issues", + "source": "https://github.com/codeigniter4/settings/tree/v2.2.0" + }, + "time": "2024-01-06T07:10:58+00:00" + }, + { + "name": "codeigniter4/shield", + "version": "v1.0.3", + "source": { + "type": "git", + "url": "https://github.com/codeigniter4/shield.git", + "reference": "3fbac7a3da41ebaac7d51708244f68df596409f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/codeigniter4/shield/zipball/3fbac7a3da41ebaac7d51708244f68df596409f0", + "reference": "3fbac7a3da41ebaac7d51708244f68df596409f0", + "shasum": "" + }, + "require": { + "codeigniter4/settings": "^2.1", + "php": "^7.4.3 || ^8.0" + }, + "provide": { + "codeigniter4/authentication-implementation": "1.0" + }, + "require-dev": { + "codeigniter/phpstan-codeigniter": "^1.3", + "codeigniter4/devkit": "^1.0", + "codeigniter4/framework": ">=4.3.5 <4.5.0 || ^4.5.1", + "firebase/php-jwt": "^6.4", + "mikey179/vfsstream": "^1.6.7", + "mockery/mockery": "^1.0", + "phpstan/extension-installer": "^1.3", + "phpstan/phpstan-strict-rules": "^1.5", + "rector/rector": "1.0.4" + }, + "suggest": { + "ext-curl": "Required to use the password validation rule via PwnedValidator class.", + "ext-openssl": "Required to use the JWT Authenticator." + }, + "type": "library", + "autoload": { + "psr-4": { + "CodeIgniter\\Shield\\": "src" + }, + "exclude-from-classmap": [ + "**/Database/Migrations/**" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lonnie Ezell", + "email": "lonnieje@gmail.com", + "role": "Developer" + } + ], + "description": "Authentication and Authorization for CodeIgniter 4", + "homepage": "https://github.com/codeigniter4/shield", + "keywords": [ + "Authentication", + "authorization", + "codeigniter", + "codeigniter4" + ], + "support": { + "docs": "https://codeigniter4.github.io/shield/", + "forum": "https://github.com/codeigniter4/shield/discussions", + "issues": "https://github.com/codeigniter4/shield/issues", + "slack": "https://codeigniterchat.slack.com", + "source": "https://github.com/codeigniter4/shield" + }, + "time": "2024-04-14T08:57:57+00:00" + }, { "name": "laminas/laminas-escaper", "version": "2.13.0",