Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README.md

simple-token v0.01

A bare-bones php token authentication class

Features

simple token requires nothing more than a base installation of PHP 5.3 and can be easily adapted for use in an API.

Usage

  1. Generate a key to store on each end

    $key = SimpleToken::generateKey();
  2. Generate a token to be passed from one end to the other. This token will be good for until the end of the current day. There's a better way to do this, and I'll certainly come back and make it so, someday.

    $token = SimpleToken::generateToken($key, $content);
  3. Verify the authenticity of the transaction.

    if(SimpleToken::isAuthentic($key, $content, $token))
    {
    	echo 'Valid';
    }
    else
    {
    	echo 'Invalid';
    }

License

simple-token is open-sourced software licensed under the MIT License.

Contact

About

A bare-bones php token authentication class

Resources

Releases

No releases published

Languages

You can’t perform that action at this time.