skievacd/pb-auth-handler

此包的官方仓库似乎已消失,因此该包已被冻结。

v1.0.4 2021-06-16 21:59 UTC

This package is auto-updated.

Last update: 2022-03-16 23:45:35 UTC


README

提供了解密信息和验证令牌有效期的方法,以及用于获取加密和解密令牌的getter。

安装

composer require skievacd/pb-auth-handler

使用方法

为了验证加密令牌的有效期

    use AuthHandler\Auth;

    $auth = new Auth();
    $auth->validate($encryptedToken, $encryptionKey, $encryptionInitialValue, $tokenLifeTime);

为了恢复加密和解密的令牌,请使用以下方法

    use AuthHandler\Auth;

    $auth = new Auth();
    $auth->validate($encryptedToken, $encryptionKey, $encryptionInitialValue, $tokenLifeTime);
    
    $auth->getToken();
    $auth->getEncryptedToken();