Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Commit

Permalink
Add the new identifier_first argument to prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
kpurdon committed Jan 21, 2021
1 parent 4ed4fd8 commit f0aceed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions management/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions management/prompt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
})
}

0 comments on commit f0aceed

Please sign in to comment.