From 0518a44d3f2ce6270e8fdd216f9459bfc6cc7c56 Mon Sep 17 00:00:00 2001 From: Dave Smith-Hayes Date: Tue, 14 May 2024 21:44:08 -0400 Subject: [PATCH] Add some authorization to the infrastructure code. --- .../src/Infrastructure/DatabaseConnection.php | 5 +++++ .../User/BasicUserAuthorization.php | 22 +++++++++++++++++++ .../User/UserAuthorizationInterface.php | 9 ++++++++ 3 files changed, 36 insertions(+) create mode 100644 code/src/Infrastructure/User/BasicUserAuthorization.php create mode 100644 code/src/Infrastructure/User/UserAuthorizationInterface.php diff --git a/code/src/Infrastructure/DatabaseConnection.php b/code/src/Infrastructure/DatabaseConnection.php index e605a23..b445e96 100644 --- a/code/src/Infrastructure/DatabaseConnection.php +++ b/code/src/Infrastructure/DatabaseConnection.php @@ -23,4 +23,9 @@ class DatabaseConnection implements DatabaseConnectionInterface { return $this->pdo; } + + public function getName(): string + { + return $this->name; + } } diff --git a/code/src/Infrastructure/User/BasicUserAuthorization.php b/code/src/Infrastructure/User/BasicUserAuthorization.php new file mode 100644 index 0000000..2146b3f --- /dev/null +++ b/code/src/Infrastructure/User/BasicUserAuthorization.php @@ -0,0 +1,22 @@ +