98_GoogleAuth.pm: issuer=FHEM added to qr-code

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@13092 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2017-01-15 15:59:03 +00:00
parent 4231c9e927
commit 4aee96decb

View File

@ -64,6 +64,8 @@
# added: commandref documentation EN # added: commandref documentation EN
# #
# 2017-01-15 - published to FHEM # 2017-01-15 - published to FHEM
# fixed: problem on iOS if label contains spaces
# added: issuer=FHEM
# #
=cut =cut
@ -193,7 +195,7 @@ sub _ga_make_url($) {
my $qrsize = AttrVal($name,'ga_qrSize','200x200'); my $qrsize = AttrVal($name,'ga_qrSize','200x200');
my $secret_base32 = getKeyValue("googleAuth$name"); my $secret_base32 = getKeyValue("googleAuth$name");
return undef unless defined($secret_base32); return undef unless defined($secret_base32);
my $url = "otpauth://totp/$label?secret=$secret_base32"; my $url = "otpauth://totp/$label?secret=$secret_base32&issuer=FHEM";
my $qr_url = "https://chart.googleapis.com/chart?cht=qr&chs=$qrsize"."&chl="; my $qr_url = "https://chart.googleapis.com/chart?cht=qr&chs=$qrsize"."&chl=";
$qr_url .= uri_escape($url); $qr_url .= uri_escape($url);
return $qr_url; return $qr_url;