定制 surfnet/yubikey-api-client-bundle 二次开发

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

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

surfnet/yubikey-api-client-bundle

最新稳定版本:6.0.0

Composer 安装命令:

composer require surfnet/yubikey-api-client-bundle

包简介

A Symfony bundle to integrate Yubikey OTP validation service.

README 文档

README

A Symfony bundle to integrate Yubikey's OTP validation service.

Installation

Add the bundle to your Composer file.

composer require 'surfnet/yubikey-api-client-bundle'

Add the bundle to your AppKernel.

public function registerBundles()
{
    $bundles[] = new Surfnet\YubikeyApiClientBundle\SurfnetYubikeyApiClientBundle;
}

Usage

public function fooAction()
{
    /** @var \Surfnet\YubikeyApiClientBundle\Service\VerificationService */
    $service = $this->get('surfnet_yubikey_api_client.verification_service');
    
    if (!\Surfnet\YubikeyApiClient\Otp::isValid('user-input-otp-here')) {
        // User-entered OTP string is not valid.
    }
    
    $otp = \Surfnet\YubikeyApiClient\Otp::fromString('user-input-otp-here');
    $result = $service->verify($otp);
    
    if ($result->isSuccessful()) {
        // Yubico verified OTP.
    }
}

统计信息

  • 总下载量: 13.66k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 12
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 10
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2014-09-23