mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-13 05:15:53 +02:00
Add Token credential request handling
Asking for 2FA Token prompt when an additional authentication is configured for git over SSH
This commit is contained in:
parent
13bd4b964f
commit
8813587961
4 changed files with 14 additions and 0 deletions
|
@ -39,6 +39,8 @@ func TestProcessOutput(t *testing.T) {
|
|||
return "passphrase"
|
||||
case PIN:
|
||||
return "pin"
|
||||
case Token:
|
||||
return "token"
|
||||
default:
|
||||
panic("unexpected credential type")
|
||||
}
|
||||
|
@ -92,6 +94,12 @@ func TestProcessOutput(t *testing.T) {
|
|||
output: "Enter PIN for key '123':",
|
||||
expectedToWrite: "pin",
|
||||
},
|
||||
{
|
||||
name: "2FA token prompt",
|
||||
promptUserForCredential: defaultPromptUserForCredential,
|
||||
output: "testuser 2FA Token (citadel)",
|
||||
expectedToWrite: "token",
|
||||
},
|
||||
{
|
||||
name: "username and password prompt",
|
||||
promptUserForCredential: defaultPromptUserForCredential,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue