"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "linotpd/src/linotp/tokens/base/__init__.py" between
LinOTP-release-2.11.2.tar.gz and LinOTP-release-2.12.tar.gz

About: LinOTP is a flexible and versatile OTP-platform for strong user authentication (two-factor authentication with one time passwords).

__init__.py  (LinOTP-release-2.11.2):__init__.py  (LinOTP-release-2.12)
skipping to change at line 411 skipping to change at line 411
This method returns the token specific challenge validity This method returns the token specific challenge validity
:return: int - validity in seconds :return: int - validity in seconds
''' '''
validity = 120 validity = 120
try: try:
validity = int(getFromConfig('DefaultChallengeValidityTime', 120)) validity = int(getFromConfig('DefaultChallengeValidityTime', 120))
# handle the token specific validity # -------------------------------------------------------------- --
# handle the token specific validity:
#
# we have to support config variables with prefix formats like:
#
# - capitalize: 'EmailChallengeValidityTime' (historically) and
# - upper: 'QRChallengeValidityTime' (historically) and
# - lower: 'emailChallengeValidityTime' (due to limitations in the
# mako / js automatic processing of config values)
typ = self.getType() typ = self.getType()
lookup_for = typ.capitalize() + 'ChallengeValidityTime' for token_typ in [typ.capitalize(), typ.upper(), typ.lower()] :
validity = int(getFromConfig(lookup_for, validity))
lookup_for = token_typ + 'ChallengeValidityTime'
validity = int(getFromConfig(lookup_for, validity))
# -------------------------------------------------------------- --
# instance specific timeout # instance specific timeout
validity = int(self.getFromTokenInfo('challenge_validity_time', validity = int(self.getFromTokenInfo('challenge_validity_time',
validity)) validity))
except ValueError: except ValueError:
validity = 120 validity = 120
return validity return validity
 End of changes. 2 change blocks. 
3 lines changed or deleted 17 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)