定制 wildwolf/yubico-otp 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wildwolf/yubico-otp

最新稳定版本:4.0.1

Composer 安装命令:

composer require wildwolf/yubico-otp

包简介

Alternative to the official php-yubico client

README 文档

README

CI Static Code Analysis Quality Gate Status

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, $secret are the Client ID and the secret key; you will need to sign up for them;
  • $code is the OTP code to verify (it will look something like ccccccjknjjnfffttntuknrfnkednknkfjegcrhhkuut; see OTP::parsePasswordOTP() for its format);
  • $result is the verification result (true for success, false for failure);
  • $response is 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.16k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 7
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04