qantis / url-generator
此包的最新版本(v1.2.0)没有可用的许可证信息。
Qantis平台和市场连接链接生成器
v1.2.0
2024-03-08 14:18 UTC
Requires
- php: ^7.0||^8.0
This package is auto-updated.
Last update: 2024-09-02 08:26:18 UTC
README
通过Composer安装php
安装'qantis/url-generator'包: composer require qantis/url-generator
Qantis平台
<?php
use Qantis\Tools\UrlGenerator;
include __DIR__.'/vendor/autoload.php';
$urlGenerator = new UrlGenerator('ma_clé_secrete');
$url = $urlGenerator('test@example.com');
echo $url;
// renvoie /connexion/?email=test@example.com×tamp=111111&hash=xxxxxx
Qantis市场
<?php
use Qantis\Tools\MkpUrlGenerator;
include __DIR__.'/vendor/autoload.php';
$urlGenerator = new MkpUrlGenerator('ma_clé_secrete');
$url = $urlGenerator('test@example.com');
echo $url;
// renvoie /login/auto-login/?email=test@example.com×tamp=111111&hash=xxxxxx
- 在生成的url上发出GET请求,然后返回一个url,用户可以自动连接到市场。
通用算法
所需参数
email
对应要连接的用户邮箱timestamp
单位为秒hash
是计算得出的- 连接email、timestamp和密钥
- 使用SHA256对结果进行哈希处理
- 将哈希转换为base-64
获取密钥
您需要向Qantis的联系人请求您的密钥。