diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2021-12-02 21:28:16 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-02 21:28:16 +1100 |
| commit | 104a61ecd68e8cf4270efa59f4c2ed2257b6496e (patch) | |
| tree | 87f76798a1b7d4c786c62c87cb12a02b4bd7316c /internal/handlers/handler_sign_u2f_step2_test.go | |
| parent | f0119b5c754f46be7814dca04d73a7710a720689 (diff) | |
refactor(web): only fetch totp conf if required (#2663)
Prevents the TOTP user config from being requested when the user has not registered or is already authenticated 2FA.
Diffstat (limited to 'internal/handlers/handler_sign_u2f_step2_test.go')
| -rw-r--r-- | internal/handlers/handler_sign_u2f_step2_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/handlers/handler_sign_u2f_step2_test.go b/internal/handlers/handler_sign_u2f_step2_test.go index 8cb3c289a..7fb0ec180 100644 --- a/internal/handlers/handler_sign_u2f_step2_test.go +++ b/internal/handlers/handler_sign_u2f_step2_test.go @@ -50,7 +50,7 @@ func (s *HandlerSignU2FStep2Suite) TestShouldRedirectUserToDefaultURL() { Successful: true, Banned: false, Time: s.mock.Clock.Now(), - Type: regulation.AuthTypeFIDO, + Type: regulation.AuthTypeU2F, RemoteIP: models.NewIPAddressFromString("0.0.0.0"), })) @@ -82,7 +82,7 @@ func (s *HandlerSignU2FStep2Suite) TestShouldNotReturnRedirectURL() { Successful: true, Banned: false, Time: s.mock.Clock.Now(), - Type: regulation.AuthTypeFIDO, + Type: regulation.AuthTypeU2F, RemoteIP: models.NewIPAddressFromString("0.0.0.0"), })) @@ -110,7 +110,7 @@ func (s *HandlerSignU2FStep2Suite) TestShouldRedirectUserToSafeTargetURL() { Successful: true, Banned: false, Time: s.mock.Clock.Now(), - Type: regulation.AuthTypeFIDO, + Type: regulation.AuthTypeU2F, RemoteIP: models.NewIPAddressFromString("0.0.0.0"), })) @@ -141,7 +141,7 @@ func (s *HandlerSignU2FStep2Suite) TestShouldNotRedirectToUnsafeURL() { Successful: true, Banned: false, Time: s.mock.Clock.Now(), - Type: regulation.AuthTypeFIDO, + Type: regulation.AuthTypeU2F, RemoteIP: models.NewIPAddressFromString("0.0.0.0"), })) @@ -170,7 +170,7 @@ func (s *HandlerSignU2FStep2Suite) TestShouldRegenerateSessionForPreventingSessi Successful: true, Banned: false, Time: s.mock.Clock.Now(), - Type: regulation.AuthTypeFIDO, + Type: regulation.AuthTypeU2F, RemoteIP: models.NewIPAddressFromString("0.0.0.0"), })) |
