From f0aceed811fcb51dba216708ee8b6c456c5cff1a Mon Sep 17 00:00:00 2001 From: Kyle Purdon Date: Thu, 21 Jan 2021 12:15:11 -0700 Subject: [PATCH] Add the new identifier_first argument to prompts --- management/prompt.go | 3 +++ management/prompt_test.go | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/management/prompt.go b/management/prompt.go index ffb3900b..a2b06813 100644 --- a/management/prompt.go +++ b/management/prompt.go @@ -3,6 +3,9 @@ package management type Prompt struct { // Which login experience to use. Can be `new` or `classic`. UniversalLoginExperience string `json:"universal_login_experience,omitempty"` + + // IdentifierFirst determines if the login screen prompts for just the identifier, identifier and password first. + IdentifierFirst bool `json:"identifier_first,omitempty"` } type PromptManager struct { diff --git a/management/prompt_test.go b/management/prompt_test.go index 42c564b2..d67869cb 100644 --- a/management/prompt_test.go +++ b/management/prompt_test.go @@ -23,6 +23,7 @@ func TestPrompt(t *testing.T) { expected := "new" err := m.Prompt.Update(&Prompt{ UniversalLoginExperience: expected, + IdentifierFirst: true, }) if err != nil { t.Error(err) @@ -35,6 +36,9 @@ func TestPrompt(t *testing.T) { if ps.UniversalLoginExperience != expected { t.Errorf("unexpected output. have %v, expected %v", ps.UniversalLoginExperience, expected) } + if ps.IdentifierFirst != false { + t.Errorf("unexpected output. have %v, expected %v", ps.IdentifierFirst, true) + } t.Logf("%v\n", ps) }) }