Skip to content

Commit

Permalink
[#160] prompt when api-token is invalid to get new token
Browse files Browse the repository at this point in the history
  • Loading branch information
coryb committed Apr 15, 2018
1 parent 06b26c9 commit e639cce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jiracli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ func register(app *kingpin.Application, o *oreo.Client, fig *figtree.FigTree) {
// rerun the original request
return o.Do(req)
}
} else if globals.AuthMethod() == "api-token" && resp.StatusCode == 401 {
globals.SetPass("")
return o.Do(req)
}
return resp, nil
},
Expand Down

0 comments on commit e639cce

Please sign in to comment.