Skip to content

Commit

Permalink
group together default and appRole login cases
Browse files Browse the repository at this point in the history
  • Loading branch information
fcgravalos authored and eduardogr committed Dec 14, 2020
1 parent 88a9e60 commit be2427b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ type client struct {

func (c *client) vaultLogin() error {
switch c.authMethod {
case appRoleAuthMethod:
return c.vaultAppRoleLogin()
case kubernetesAuthMethod:
fd, err := os.Open(kubernetesJwtTokenPath)
defer fd.Close()
if err != nil {
return err
}
return c.vaultKubernetesLogin(fd)
case appRoleAuthMethod:
fallthrough
default:
return c.vaultAppRoleLogin()
}
Expand Down

0 comments on commit be2427b

Please sign in to comment.