Skip to content
Sven edited this page May 4, 2017 · 3 revisions

Install

Add to composer:

composer require "pmdevelopment/yubikey-otp-bundle" "^1.0.0"

Add to kernel:

new PM\Bundle\YubikeyOtpBundle\PMYubikeyOtpBundle(),

Add to config.yml

pm_yubikey_otp:
    server:
        uri: https://api2.yubico.com/wsapi/2.0/
        client_id: YourClientId
        client_secret: YourApiKey

Usage

Now you can validate any a OTP by using a service

$this->get("pm_yubikey_otp.validation")->verify("YourOtpToValidate", "OptionalTheIdentityYouExpect");

Clone this wiki locally