Skip to content

Commit

Permalink
Fix TOTP generation. Fix what commit a5a5cd9 broke.
Browse files Browse the repository at this point in the history
  • Loading branch information
lhellebr committed Apr 29, 2024
1 parent de93ea2 commit 3962206
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/foreman/destructive/test_ldap_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def configure_hammer_session(parametrized_enrolled_sat, enable=True):

def generate_otp(secret):
"""Return the time_based_otp"""
time_otp = pyotp.TOTP(secret)
time_otp = pyotp.TOTP(secret, digest='SHA1', digits=6, interval=120)
return time_otp.now()


Expand Down Expand Up @@ -565,7 +565,9 @@ def test_user_permissions_rhsso_user_multiple_group(
assert login_details['username'] in current_user


def test_totp_user_login(ad_data, module_target_sat):
def test_totp_user_login(
enable_external_auth_rhsso, rhsso_setting_setup, ad_data, module_target_sat
):
"""Verify the TOTP authentication of LDAP user interlinked with RH-SSO
:id: cf8dfa00-4f48-11eb-b7d5-d46d6dd3b5b2
Expand Down

0 comments on commit 3962206

Please sign in to comment.