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: 2025-04-16 17:00:53 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
, theusername
will 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
true
orfalse
AuthToken::check();
Delete Token:
AuthToken::delete();