stages/authenticator_validate: improve logging

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-11-11 23:33:37 +01:00
parent bb5e0ebab1
commit 1cfe81887b
1 changed files with 2 additions and 1 deletions

View File

@ -95,7 +95,8 @@ class AuthenticatorValidateStageView(ChallengeStageView):
def get_device_challenges(self) -> list[dict]:
"""Get a list of all device challenges applicable for the current stage"""
challenges = []
user_devices = devices_for_user(self.get_pending_user())
# Convert to a list to have usable log output instead of just <generator ...>
user_devices = list(devices_for_user(self.get_pending_user()))
LOGGER.debug("Got devices for user", devices=user_devices)
# static and totp are only shown once