From 96387025da63025894f6259f7eebed0fc6fc53ac Mon Sep 17 00:00:00 2001 From: winter Sparkles Date: Sun, 9 Aug 2026 15:44:18 +0100 Subject: implement the rest of login process incl. cookie redirects and 'next' --- Psso/Identity.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Psso/Identity.php') 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); } } -- cgit v1.3