OTPHP\HOTP::getProvisioningUri PHP Метод

getProvisioningUri() публичный Метод

public getProvisioningUri ( )
    public function getProvisioningUri()
    {
        return $this->generateURI('hotp', ['counter' => $this->getCounter()]);
    }

Usage Example

 /**
  * @dataProvider testProvisioningURIData
  */
 public function testProvisioningURI($secret, $label, $counter, $issuer, $expectedResult, $exception = null, $message = null)
 {
     $hotp = new HOTP($secret);
     try {
         $hotp->setLabel($label);
         $hotp->setIssuer($issuer);
         $hotp->setInitialCount($counter);
         $this->assertEquals($expectedResult, $hotp->getProvisioningUri());
         if ($exception !== null) {
             $this->fail("The expected exception '{$exception}' was not thrown");
         }
     } catch (\Exception $e) {
         if (!$exception || !$e instanceof $exception) {
             throw $e;
         }
         $this->assertEquals($message, $e->getMessage());
     }
 }
All Usage Examples Of OTPHP\HOTP::getProvisioningUri