wildwolf/yubico-otp
最新稳定版本:4.0.1
Composer 安装命令:
composer require wildwolf/yubico-otp
包简介
Alternative to the official php-yubico client
README 文档
README
PHP 7/8-friendly alternative to the official php-yubico client.
Installation
composer require wildwolf/yubico-otp
Usage
$otp = new WildWolf\Yubico\OTP($id, $secret); $response = null; $result = $otp->verify($code, null, &$response);
Where:
$id,$secretare the Client ID and the secret key; you will need to sign up for them;$codeis the OTP code to verify (it will look something likeccccccjknjjnfffttntuknrfnkednknkfjegcrhhkuut; seeOTP::parsePasswordOTP()for its format);$resultis the verification result (truefor success,falsefor failure);$responseis the raw response from Yubico (details).
verify() can throw OTPBadResponseException if the response fails the basic sanity checks, OTPTamperedResponseException if the response signature fails to validate, OTPTransportException in case of the issues talking to the OTP server.
统计信息
- 总下载量: 26.17k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-17