academy01 / auth-token
authentication manager system for php
1.1.x-dev
2023-09-05 16:18 UTC
Requires
- php: >=7.3
This package is auto-updated.
Last update: 2026-03-16 18:53:56 UTC
README
Simple Authentication Token Manager System.
Installation
just include AuthToken.php into your document.
and edit $domain and $salt
include_once "AuthToken.php";
Usage
Generate Token:
- you can pass the username to this method (
optional) - If you have already created a session called
username, theusernamewill be set automatically and does not need to be set separately.
AuthToken::generate();
Check Token:
- You must use a username if you used it to Generate a token.
- this method returns
trueorfalse
AuthToken::check();
Delete Token:
AuthToken::delete();