diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-03-17 02:19:27 +0200 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-03-17 02:19:27 +0200 |
| commit | 26229c110fb92646b36c7b2f48ac7518fd3810a5 (patch) | |
| tree | 72b2f2e0e0c789853ceb815fd5b513ad31672cac /core/classes/authentication | |
| parent | 1e438654005bd408447dc19c8a96099d228bb1aa (diff) | |
| download | classroom-26229c110fb92646b36c7b2f48ac7518fd3810a5.tar.gz classroom-26229c110fb92646b36c7b2f48ac7518fd3810a5.tar.bz2 classroom-26229c110fb92646b36c7b2f48ac7518fd3810a5.zip | |
set algorithns for user authentication and authorization
Diffstat (limited to 'core/classes/authentication')
| -rw-r--r-- | core/classes/authentication/User.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/core/classes/authentication/User.php b/core/classes/authentication/User.php index 4aef375..cc9d5e3 100644 --- a/core/classes/authentication/User.php +++ b/core/classes/authentication/User.php @@ -20,6 +20,9 @@ class User implements UserInterface // @var array private $roles = []; + // @var array + private $privileges = []; + // @var bool private $enabled = true; @@ -52,6 +55,14 @@ class User implements UserInterface return $this->roles; } + /** getPrivileges + * @return array + */ + public function getPrivileges(): array + { + return $this->privileges; + } + /** isEnabled * @return bool */ @@ -98,6 +109,17 @@ class User implements UserInterface return $this; } + /** setPrivileges() + * + * @param array $roles + * @return User + */ + public function setPrivileges(array $privileges): self + { + $this->privileges = $privileges; + return $this; + } + /** setEnabled * * @param bool $enabled |
