Skip to content

Commit

Permalink
fix: Bring bearer back (#696)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitpokhrel authored Jan 8, 2024
1 parent e2f4533 commit cb134c3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions internal/config/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,19 +222,21 @@ func (c *JiraCLIConfigGenerator) configureLocalAuthType() error {
if c.usrCfg.AuthType == "" {
qs := &survey.Select{
Message: "Authentication type:",
Help: "basic (login) or mtls (client certs)?",
Options: []string{"basic", "mtls"},
Help: "basic (login), bearer (PAT) or mtls (client certs)?",
Options: []string{"basic", "bearer", "mtls"},
Default: "basic",
}

if err := survey.AskOne(qs, &authType); err != nil {
return err
}
}

if authType == jira.AuthTypeMTLS.String() {
switch authType {
case jira.AuthTypeBearer.String():
c.value.authType = jira.AuthTypeBearer
case jira.AuthTypeMTLS.String():
c.value.authType = jira.AuthTypeMTLS
} else {
default:
c.value.authType = jira.AuthTypeBasic
}

Expand Down

0 comments on commit cb134c3

Please sign in to comment.