Cherry-pick from PR #2435 (Show TOTP Issuer)

This commit is contained in:
Frederic Guillot
2016-07-10 14:18:10 -04:00
parent 8a85550f92
commit 34d0995d55
4 changed files with 13 additions and 4 deletions

View File

@@ -123,7 +123,8 @@ class TotpAuth extends Base implements PostAuthenticationProviderInterface
return '';
}
return GoogleAuthenticator::getQrCodeUrl('totp', $label, $this->secret);
$options = array('issuer' => TOTP_ISSUER);
return GoogleAuthenticator::getQrCodeUrl('totp', $label, $this->secret, null, $options);
}
/**
@@ -139,6 +140,7 @@ class TotpAuth extends Base implements PostAuthenticationProviderInterface
return '';
}
return GoogleAuthenticator::getKeyUri('totp', $label, $this->secret);
$options = array('issuer' => TOTP_ISSUER);
return GoogleAuthenticator::getKeyUri('totp', $label, $this->secret, null, $options);
}
}

View File

@@ -134,3 +134,5 @@ defined('HTTP_PROXY_PORT') or define('HTTP_PROXY_PORT', '3128');
defined('HTTP_PROXY_USERNAME') or define('HTTP_PROXY_USERNAME', '');
defined('HTTP_PROXY_PASSWORD') or define('HTTP_PROXY_PASSWORD', '');
defined('HTTP_VERIFY_SSL_CERTIFICATE') or define('HTTP_VERIFY_SSL_CERTIFICATE', true);
defined('TOTP_ISSUER') or define('TOTP_ISSUER', 'Kanboard');