Google Authenticator Verification iRule (TMOS v11.1+ optimized)
Updated Jun 06, 2023
Version 2.0Was this article helpful?
Hi Stanislas,
Performance wise its better to use three tailordered code blocks. The problem of using cascaded for/foreach loops is, that you can't easily
break
further execution within the inner loop once a match is found. You have to use a variable to maintain the result and you need to check this variable on each subsequent iteration.
Usability wise its up to you. Personally I think that using three times a slightly modified code is slightly easier to understand than a cascaded for/foreach loop. But mileage may vary... 😉
Cheers, Kai