aboutsummaryrefslogtreecommitdiff
path: root/Psso/Identity.php
diff options
context:
space:
mode:
authorwinter Sparkles2026-08-09 15:44:18 +0100
committerwinter Sparkles2026-08-09 15:44:18 +0100
commit96387025da63025894f6259f7eebed0fc6fc53ac (patch)
treea83d73eeb7ec419b24ff78291634503d4ebceec1 /Psso/Identity.php
parentc8998ccdff070d7c73a634e031a041260b87c3b1 (diff)
implement the rest of login process incl. cookie redirects and 'next'
Diffstat (limited to 'Psso/Identity.php')
-rw-r--r--Psso/Identity.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/Psso/Identity.php b/Psso/Identity.php
index 68272d4..a06f57e 100644
--- a/Psso/Identity.php
+++ b/Psso/Identity.php
@@ -4,9 +4,17 @@ namespace Psso;
class Identity {
public protected(set) string $user;
public protected(set) array $groups;
+ public array $extras;
- public function __construct(string $user, array $groups = []) {
+ public function __construct(
+ string $user, array $groups = [], array $extras = []
+ ) {
$this->user = $user;
$this->groups = $groups;
+ $this->extras = $extras;
+ }
+
+ public static function fromContext(Context $context) {
+ return new static($context->user, $context->groups, $context->extras);
}
}