Skip to content

Commit

Permalink
Fix TOTP generation. Fix what commit a5a5cd9 broke. (#14645)
Browse files Browse the repository at this point in the history
(cherry picked from commit 50195ff)
  • Loading branch information
lhellebr authored and web-flow committed May 7, 2024
1 parent 9e8695d commit 26ab7ed
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 @@ -130,7 +130,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 @@ -569,7 +569,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 26ab7ed

Please sign in to comment.