getUrl() public method

Returns a QR code URL for easy setup of TOTP apps like Google Authenticator
public getUrl ( string $user, string $hostname, string $secret ) : string
$user string User
$hostname string Hostname
$secret string Secret string
return string
Example #1
0
 /**
  * @return  void
  */
 public function testGetUrl()
 {
     $this->assertEquals('https://chart.googleapis.com/chart?chs=200x200&chld=Q|2&cht=qr&chl=otpauth%3A%2F%2Ftotp%2FJohnnieWalker%40example.com%3Fsecret%3DKREECVCJKNKE6VCBJRGFSU2FINJEKVA', $this->totp->getUrl('JohnnieWalker', 'example.com', 'KREECVCJKNKE6VCBJRGFSU2FINJEKVA'));
 }