Simple Authentication Token Manager
System.
just include AuthToken.php
into your document.
and edit $domain
and $salt
include_once "AuthToken.php";
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();