Skip to content

Commit

Permalink
Add the ability to pass in mfa parameters when authenticating via the… (
Browse files Browse the repository at this point in the history
  • Loading branch information
broamski authored and jefferai committed Dec 26, 2017
1 parent 9c7e739 commit 3f3e96d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions builtin/credential/okta/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ func (h *CLIHandler) Auth(c *api.Client, m map[string]string) (*api.Secret, erro
"password": password,
}

mfa_method, ok := m["method"]
if ok {
data["method"] = mfa_method
}
mfa_passcode, ok := m["passcode"]
if ok {
data["passcode"] = mfa_passcode
}

path := fmt.Sprintf("auth/%s/login/%s", mount, username)
secret, err := c.Logical().Write(path, data)
if err != nil {
Expand Down

0 comments on commit 3f3e96d

Please sign in to comment.