Documentation
¶
Index ¶
- Constants
- func CreateUserWithMFARequiredRole(t *testing.T, admin *setup.UserClient, name string) *setup.UserClient
- func EnableMFA(t *testing.T, client *sdk.HTTPClient) *sdk.MFASetupResponse
- func GenerateTOTPCode(t *testing.T, secret string) string
- func VerifyMFACodeWithSecret(t *testing.T, client *sdk.HTTPClient, challengeToken, secret string) *sdk.LoginResponse
- func WaitForNewTOTPWindow(t *testing.T)
Constants ¶
View Source
const TOTPPeriod = 3
TOTPPeriod must match TOTP_PERIOD in docker-compose.yml (3s for fast tests)
Variables ¶
This section is empty.
Functions ¶
func CreateUserWithMFARequiredRole ¶
func CreateUserWithMFARequiredRole(t *testing.T, admin *setup.UserClient, name string) *setup.UserClient
CreateUserWithMFARequiredRole creates a user assigned to an MFA-required role (not logged in)
func EnableMFA ¶
func EnableMFA(t *testing.T, client *sdk.HTTPClient) *sdk.MFASetupResponse
EnableMFA completes setup + enable in a single call
func GenerateTOTPCode ¶
GenerateTOTPCode generates a TOTP code using the 3-second test period
func VerifyMFACodeWithSecret ¶
func VerifyMFACodeWithSecret(t *testing.T, client *sdk.HTTPClient, challengeToken, secret string) *sdk.LoginResponse
VerifyMFACodeWithSecret generates a TOTP code and verifies MFA
func WaitForNewTOTPWindow ¶
WaitForNewTOTPWindow waits until the next TOTP window to avoid replay detection
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.