Skip to content

frowhy/Authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

History
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Authentication

Installation

The preferred method of installation is via Packagist and Composer. Run the following command to install the package and add it as a requirement to your project's composer.json:

composer require frowhy/authentication

Examples

use Frowhy\Authentication\Authentication;

require_once __DIR__ . '/vendor/autoload.php';
header('Content-type: application/json');

$str = 'aaa';
$salt = 'bbb';
$make = Authentication::make($str, $salt);
$state = Authentication::verify($make);
$sign = Authentication::get($make, $salt);

echo json_encode(['make' => $make, 'state' => $state, 'sign' => $sign]);

About

鉴权类

Resources

Stars

Watchers

Forks