"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "linotpd/src/linotp/lib/auth/finishtokens.py" between
LinOTP-release-2.12.1.tar.gz and LinOTP-release-2.12.2.tar.gz

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

finishtokens.py  (LinOTP-release-2.12.1):finishtokens.py  (LinOTP-release-2.12.2)
skipping to change at line 409 skipping to change at line 409
# get all owners for the valid tokens # get all owners for the valid tokens
all_owners = set() all_owners = set()
for token in valid_tokens: for token in valid_tokens:
# if the authenticated token is a rollout token, we dont count him # if the authenticated token is a rollout token, we dont count him
path = token.getFromTokenInfo('scope',{}).get('path',[]) path = token.getFromTokenInfo('scope',{}).get('path',[])
if len(path) == 1 and path[0] == 'userservice': if set(path) & set(['userservice', 'validate']):
continue continue
owner = get_token_owner(token) owner = get_token_owner(token)
if owner: if owner:
all_owners.add(owner) all_owners.add(owner)
# ------------------------------------------------------------------ -- # ------------------------------------------------------------------ --
# get all rollout only tokens per owner # get all rollout only tokens per owner
skipping to change at line 440 skipping to change at line 440
# if there is only one token either # if there is only one token either
# - the user has still the rollout: do not delete # - the user has still the rollout: do not delete
# - or the user has a new one: we dont delete either # - or the user has a new one: we dont delete either
if len(user_tokens) < 2: if len(user_tokens) < 2:
continue continue
for token in user_tokens: for token in user_tokens:
path = token.getFromTokenInfo('scope',{}).get('path',[]) path = token.getFromTokenInfo('scope',{}).get('path',[])
if len(path) == 1 and path[0] == 'userservice': if set(path) & set(['userservice', 'validate']):
to_be_removed_tokens.append(token) to_be_removed_tokens.append(token)
# ------------------------------------------------------------------ -- # ------------------------------------------------------------------ --
# delete all rollout tokens # delete all rollout tokens
serials = [] serials = []
for token in to_be_removed_tokens: for token in to_be_removed_tokens:
serials.append(token.getSerial()) serials.append(token.getSerial())
remove_token(token) remove_token(token)
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

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