diff options
| author | winter Sparkles | 2026-08-09 02:26:33 +0100 |
|---|---|---|
| committer | winter Sparkles | 2026-08-09 02:26:33 +0100 |
| commit | 3354d45762bbe0db33e3d26d8997e6f6624f24d7 (patch) | |
| tree | 4bef4bf59488f443ed54ff6e30002268836ac259 /Psso/Context.php | |
| parent | 4bb659e1f7bb5850db5695a536428a9b71e3ffe5 (diff) | |
implement sessions and also log in/out
session data is stored in sqlite, not using php sessions
Diffstat (limited to 'Psso/Context.php')
| -rw-r--r-- | Psso/Context.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Psso/Context.php b/Psso/Context.php index 4a2cd82..5af2102 100644 --- a/Psso/Context.php +++ b/Psso/Context.php @@ -10,4 +10,12 @@ class Context { public function addResult(ChallengeResult $result): void { $this->results[] = $result; } + + public function setTag(string $tag): void { + if (!$this->hasTag($tag)) $this->tags[] = $tag; + } + + public function hasTag(string $tag): bool { + return in_array($tag, $this->tags); + } } |
