academy01/auth-token

authentication manager system for php

1.1.x-dev 2023-09-05 16:18 UTC

This package is auto-updated.

Last update: 2024-09-16 15:43:10 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, the username 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 or false
AuthToken::check();

Delete Token:

AuthToken::delete();