I have installed the github master branch to test the TIQR enhancements. I see that the failcounter is not increased anymore when querying for the status.
What I noticed is that when I am using the TIQR token for authentication it sometimes work and other times I get an error message in the TIQR app:
unknown_error
The server returned a response in a format tiqr couldn't understand. Please contact support
```
In the privacyidea.log:
```
[2019-08-01 11:09:33,198][532][140436160804608][INFO][privacyidea.lib.user:231] userid resolved to 'c5d5dc8c-68f7-102c-9f3b-8dcfbd0742f1'
[2019-08-01 11:09:34,109][532][140436152411904][INFO][privacyidea.lib.tokens.tiqrtoken:345] Response code is not valid
[2019-08-01 11:09:34,133][532][140436152411904][INFO][privacyidea.api.lib.postpolicy:183] We only sign JSON response data.
[2019-08-01 11:09:34,211][532][140436160804608][INFO][privacyidea.lib.user:230] user 'bas' found in resolver 'cua'
[2019-08-01 11:09:34,212][532][140436160804608][INFO][privacyidea.lib.user:231] userid resolved to 'c5d5dc8c-68f7-102c-9f3b-8dcfbd0742f1'
[2019-08-01 11:09:35,200][532][140436152411904][INFO][privacyidea.lib.user:230] user 'bas' found in resolver 'cua'
[2019-08-01 11:09:35,200][532][140436152411904][INFO][privacyidea.lib.user:231] userid resolved to 'c5d5dc8c-68f7-102c-9f3b-8dcfbd0742f1'
[2019-08-01 11:09:36,197][532][140436160804608][INFO][privacyidea.lib.user:230] user 'bas' found in resolver 'cua'
```
I have adde some debugging and looked at the TIQR tokencode:
```
r = token.verify_response(
challenge=challenge.challenge, passw=passw)
if r > 0:
res = "OK"
# Mark the challenge as answered successfully.
challenge.set_otp_status(True)
# We have found a valid TiQR token transaction, we break out of the loop
log.info("Yes valid response")
break
else:
log.info("Response code is not valid")
I have added some log,info
statements and it fails in verifying the response from the phone. I do not know the specs of the TIQR protocol enough to pinpoint the problem. Mostly it happens if QRcode is scanned to late (after 15 seconds). I am using the default settings for a token. Have others encounter this problem?
When this occurs it takes a while before we could use the TIQR token again. It keeps generating the error code in the app and privacyidea log files. I have to wait for the default token validation tme 120 seconds before I can use it again
PS)
Just for the record a valid response is this: (accesing the privacyidea website with TIQR)
-08-01 11:16:27,025][532][140436160804608][INFO][privacyidea.lib.user:231] userid resolved to 'c5d5dc8c-68f7-102c-9f3b-8dcfbd0742f1'
[2019-08-01 11:16:28,029][532][140436152411904][INFO][privacyidea.lib.user:230] user 'bas' found in resolver 'cua'
[2019-08-01 11:16:28,029][532][140436152411904][INFO][privacyidea.lib.user:231] userid resolved to 'c5d5dc8c-68f7-102c-9f3b-8dcfbd0742f1'
[2019-08-01 11:16:28,635][532][140436160804608][INFO][privacyidea.lib.tokens.tiqrtoken:342] Yes valid response
[2019-08-01 11:16:28,667][532][140436160804608][INFO][privacyidea.api.lib.postpolicy:183] We only sign JSON response data.
[2019-08-01 11:16:29,028][532][140436152411904][INFO][privacyidea.lib.user:230] user 'bas' found in resolver 'cua'
[2019-08-01 11:16:29,028][532][140436152411904][INFO][privacyidea.lib.user:231] userid resolved to 'c5d5dc8c-68f7-102c-9f3b-8dcfbd0742f1'
[2019-08-01 11:16:29,143][532][140436152411904][INFO][privacyidea.lib.user:230] user 'bas' found in resolver 'cua'
[2019-08-01 11:16:29,143][532][140436152411904][INFO][privacyidea.lib.user:231] userid resolved to 'c5d5dc8c-68f7-102c-9f3b-8dcfbd0742f1'
[2019-08-01 11:16:29,144][532][140436152411904][INFO][privacyidea.lib.user:230] user 'bas' found in resolver 'cua'
[2019-08-01 11:16:29,144][532][140436152411904][INFO][privacyidea.lib.user:231] userid resolved to 'c5d5dc8c-68f7-102c-9f3b-8dcfbd0742f1'
[2019-08-01 11:16:29,161][532][140436152411904][INFO][privacyidea.lib.user:230] user 'bas' found in resolver 'cua'
[2019-08-01 11:16:29,161][532][140436152411904][INFO][privacyidea.lib.user:231] userid resolved to 'c5d5dc8c-68f7-102c-9f3b-8dcfbd0742f1'
[2019-08-01 11:16:29,250][532][140436160804608][INFO][privacyidea.lib.user:230] user 'bas' found in resolver 'cua'
[2019-08-01 11:16:29,250][532][140436160804608][INFO][privacyidea.lib.user:231] userid resolved to 'c5d5dc8c-68f7-102c-9f3b-8dcfbd0742f1'