Alan Parra
70a0ad132e
Consistently prompt for OTPs as password ( #11346 )
...
Introduce the prompt.Password function and use it consistently whenever we read
a password, OTP or PIN.
The PR makes it easy to support PINs during MFA authentication, so now we do so.
It also adds the capability to mock prompt.Stdin() for tests, adding a uniform
way to fake user input in tests without having to swap functions.
Complements #10953 and #9160 .
* Prompt for OTPs as passwords (take 1), read PINs on MFA authentication
* Add the prompt.Password method
* Add Stdin mocking capabilities to the prompt package
* Delegate password reads to prompt.Stdin().ReadPassword()
* Remove stdinHijack from PromptMFAChallenge
* Change api_login_test.go to FakeReader
* Change tsh_test.go to FakeReader
* Retire client.ReadPassword in favor of prompt.Password
2022-03-28 17:16:00 +00:00
..
2021-10-19 09:21:55 -06:00
2022-02-09 20:56:55 +11:00
2021-07-21 14:35:04 -07:00
2021-04-07 15:49:27 -07:00
2021-06-09 19:55:07 -07:00
2022-03-28 17:16:00 +00:00
2022-03-23 19:58:19 +00:00
2021-02-23 18:04:55 -08:00
2022-02-03 16:24:48 +00:00
2021-09-17 19:47:03 +10:00
2022-02-03 16:24:48 +00:00
2018-01-09 10:30:19 -08:00
2020-10-13 00:22:49 +00:00
2021-04-26 17:24:06 +00:00
2020-04-17 20:05:38 +00:00
2019-08-06 16:40:29 -07:00
2022-03-21 18:00:34 +00:00
2021-10-19 14:00:24 -04:00
2022-03-21 18:00:34 +00:00
2021-09-17 13:28:40 -07:00
2021-09-28 12:16:03 -04:00
2021-09-28 12:16:03 -04:00
2022-03-21 18:00:34 +00:00
2022-03-23 19:08:42 +00:00
2021-10-11 20:17:56 +02:00
2022-03-21 18:00:34 +00:00
2021-01-29 09:37:01 -08:00
2021-10-19 09:21:55 -06:00
2021-10-19 09:21:55 -06:00
2022-01-18 22:48:34 +00:00
2022-03-21 18:00:34 +00:00
2021-08-30 09:44:09 -07:00
2021-01-29 09:37:01 -08:00
2022-02-16 13:32:32 -05:00
2021-11-18 15:05:13 -08:00
2021-11-18 15:05:13 -08:00
2022-02-15 19:54:50 +00:00
2022-02-03 16:24:48 +00:00
2022-01-11 23:04:47 +00:00
2021-10-19 09:21:55 -06:00
2021-10-19 09:21:55 -06:00
2021-07-30 15:34:19 -07:00
2022-02-10 00:41:34 +00:00
2022-02-10 00:41:34 +00:00
2022-03-15 13:22:45 +00:00
2022-02-07 23:32:58 +00:00
2021-02-23 18:04:55 -08:00
2022-03-21 18:00:34 +00:00
2021-08-03 10:13:08 -07:00
2021-02-23 18:04:55 -08:00
2018-03-21 23:58:31 +00:00
2021-08-30 09:44:09 -07:00
2021-02-23 18:04:55 -08:00
2021-10-15 09:31:21 +11:00
2022-01-07 22:23:22 +00:00
2016-12-08 18:43:37 -08:00
2021-10-19 14:00:24 -04:00
2021-10-28 09:38:51 +11:00
2022-01-05 21:17:54 +00:00
2021-04-14 23:30:35 +00:00
2020-07-21 10:41:31 -03:00
2021-12-09 19:50:44 +00:00
2020-09-28 23:08:56 -07:00
2021-08-30 09:44:09 -07:00
2021-12-16 11:41:08 -05:00
2022-01-21 14:42:03 -07:00
2021-07-30 15:34:19 -07:00
2019-05-07 14:17:11 -07:00
2021-08-30 09:44:09 -07:00
2021-08-30 09:44:09 -07:00
2021-10-19 14:00:24 -04:00
2022-02-15 17:02:10 +01:00
2022-03-21 18:00:34 +00:00
2021-08-30 09:44:09 -07:00
2021-11-17 12:01:48 +11:00
2022-02-03 16:24:48 +00:00
2022-03-21 18:00:34 +00:00
2016-12-30 01:21:28 -08:00
2021-10-19 14:00:24 -04:00
2021-03-01 22:14:10 +01:00
2022-03-21 18:00:34 +00:00
2022-01-19 23:44:48 +00:00
2021-02-23 18:04:55 -08:00
2021-03-01 22:14:10 +01:00
2020-01-02 17:56:53 -08:00
2022-03-21 18:00:34 +00:00
2022-03-28 14:20:19 +00:00
2021-08-09 10:17:49 -07:00