diff options
| author | Freya Murphy <freya@freyacat.org> | 2024-05-31 19:10:47 -0400 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2024-05-31 19:10:47 -0400 |
| commit | 2e726ac42343e58707baeb915dec153ef2839658 (patch) | |
| tree | 8362e82dc66515a9c7745a4979cc7fff7ca49a71 /src/web/helpers/auth.php | |
| parent | many changes (diff) | |
| download | ldap_forwardauth-2e726ac42343e58707baeb915dec153ef2839658.tar.gz ldap_forwardauth-2e726ac42343e58707baeb915dec153ef2839658.tar.bz2 ldap_forwardauth-2e726ac42343e58707baeb915dec153ef2839658.zip | |
add logout, better router
Diffstat (limited to 'src/web/helpers/auth.php')
| -rw-r--r-- | src/web/helpers/auth.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/web/helpers/auth.php b/src/web/helpers/auth.php index 187f556..4d7f184 100644 --- a/src/web/helpers/auth.php +++ b/src/web/helpers/auth.php @@ -34,6 +34,11 @@ class AuthHelper { file_put_contents($path, $data, LOCK_EX); } + public function delete_session(Session $session): int { + $path = "/tmp/{$session->token}"; + return unlink($path) ? 0 : 1; + } + /** * Loads the auth session associated with a specific key * @param string $token - the session $key |