2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

98_GoogleAuth.pm: under development

- attribute ga_labelName added

git-svn-id: https://svn.fhem.de/fhem/trunk@13076 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2017-01-15 00:24:47 +00:00
parent a595ae8720
commit c08c4b0000

View File

@ -22,6 +22,7 @@ sub GoogleAuth_Initialize($) {
$hash->{FW_detailFn} = "GoogleAuth_Detail";
# $hash->{AttrFn} = "GoogleAuth_Attr";
$hash->{AttrList} = "ga_qrsize ".
"ga_labelName ".
"$readingFnAttributes";
}
@ -55,7 +56,7 @@ sub GoogleAuth_Set($$@) {
setKeyValue("googleAuth$name",$secret_base32); # write to fhem keystore
my $label = "FHEM%20Authentication%20$name";
my $label = AttrVal($name,'ga_labelName',"FHEM Authentication $name");
my $qrsize = AttrVal($name,'ga_qrsize','200x200');
my $url = "otpauth://totp/$label?secret=$secret_base32";
my $qr_url = "https://chart.googleapis.com/chart?cht=qr&chs=$qrsize"."&chl=".uri_escape($url);