rest-full/认证

这是登录时及登录后使用的认证。

1.0.0 2024-01-27 08:30 UTC

This package is auto-updated.

Last update: 2024-09-27 13:31:48 UTC


README

关于Rest-full认证

Rest-full认证是Rest-Full框架的一部分。

您可以在以下位置找到应用程序:rest-full/app,并且您还可以在以下位置查看框架骨架:rest-full/rest-full

安装

  • 下载 Composer 或更新 composer self-update
  • 运行 php composer.phar require rest-full/authentication 或全局安装的 composer compser require rest-full/authentication 或 composer.json "rest-full/autentication": "1.0.0" 并安装或更新。

用法

当前会话

<?php

require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__.'/../config/pathServer.php';

use Restfull\Authentication\Auth;

$auth = new Auth();
$auth->write('test',['test1'=>'aprovado','test2'=>'reprovado']);
print_r($auth->getsession('test'));

双因素认证

<?php

require __DIR__ . '/vendor/autoload.php';

use Restfull\Authentication\Auth;
use Restfull\Authentication\TwoSteps;

$auth = new Auth();
$twofactor = new TwoSteps($auth);
echo $twofactor->qrcodeValid()->getQrcode();

许可证

Rest-full 框架是开源软件,许可协议为 MIT 协议