mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 20:28:25 -04:00
Remove webauthn hooks
This changeset removes webauthn from the Notify.gov admin app. We are not using webauthn at all in our implementation and will be looking at an entirely different authentication system in the near future. Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
@@ -77,34 +77,6 @@ def test_should_redirect_to_two_factor_when_password_reset_is_successful(
|
||||
mock_get_user_by_email_request_password_reset.assert_called_once_with(user['email_address'])
|
||||
|
||||
|
||||
@pytest.mark.parametrize('redirect_url', [
|
||||
None,
|
||||
f'/services/{SERVICE_ONE_ID}/templates',
|
||||
])
|
||||
def test_should_redirect_to_two_factor_webauthn_when_password_reset_is_successful(
|
||||
notify_admin,
|
||||
client_request,
|
||||
mock_get_user_by_email_request_password_reset,
|
||||
mock_send_verify_code,
|
||||
mock_reset_failed_login_count,
|
||||
redirect_url
|
||||
):
|
||||
client_request.logout()
|
||||
user = mock_get_user_by_email_request_password_reset.return_value
|
||||
user['auth_type'] = 'webauthn_auth'
|
||||
data = json.dumps({'email': user['email_address'], 'created_at': str(datetime.utcnow())})
|
||||
token = generate_token(data, notify_admin.config['SECRET_KEY'], notify_admin.config['DANGEROUS_SALT'])
|
||||
client_request.post_url(
|
||||
url_for_endpoint_with_token('.new_password', token=token, next=redirect_url),
|
||||
_data={'new_password': 'a-new_password'},
|
||||
_expected_redirect=url_for('.two_factor_webauthn', next=redirect_url),
|
||||
)
|
||||
mock_get_user_by_email_request_password_reset.assert_called_once_with(user['email_address'])
|
||||
|
||||
assert not mock_send_verify_code.called
|
||||
assert mock_reset_failed_login_count.called
|
||||
|
||||
|
||||
def test_should_redirect_index_if_user_has_already_changed_password(
|
||||
notify_admin,
|
||||
client_request,
|
||||
|
||||
Reference in New Issue
Block a user