n0v1c3 / vira

Create and update your Jira issues while inside Vim!
MIT License
94 stars 12 forks source link

VIRA-293: allow access token auth #77

Closed jacobstr closed 10 months ago

jacobstr commented 2 years ago
n0v1c3 commented 2 years ago

Sorry I have been "away" for a bit. I am going to take a look at all the new posted issues then a real look into this one.

n0v1c3 commented 2 years ago

I am currently getting the error:

No `vira_servers.json/yaml` file found or, check the config! See `README.md` for more information.                                      
Error detected while processing function vira#_set[19]..vira#_connect:                                                                  
line   14:                                                                                                                              
Traceback (most recent call last):                                                                                                      
  File "<string>", line 1, in <module>                                                                                                  
  File ".../github/jacobstr/vira/python/Vira/vira_api.py", line 198, in connect                          
    auth_kwargs['basic_auth'] == (username, password)                                                                                   
KeyError: 'basic_auth'

I am sure there is a quick fix for it but I am going to look into why it turned backwards on us to try and catch it with the proper try/catch

n0v1c3 commented 2 years ago

I even knew I didn't look close enough at it. The core of the problem for the existing users will be the == on line 198 this was supposed to be an = for the group you were not as worried about ;-).

Keeping it working would be the nicest I can do the merge and the fix or you can do the fix if you would like. If it still works for both of us I will release it to master and do a backwards merge with dev and then back into the master branch.

jacobstr commented 2 years ago

Heh thanks @n0v1c3 - I'm fine if you patch it up since you were able to repro it and will be on deck to validate the fix. I ran through a few scenarios by hand but clearly missed this.

n0v1c3 commented 2 years ago

I assumed it was as simple as that. I wall get it done today and VIRA-293 can just be done with.

@jacobstr Please keep finding more to make it even safer for our users.

n0v1c3 commented 2 years ago

@jacobstr I currently have an open branch due to development VIRA-293 should exist until the full merge is complete.

mikeboiko commented 1 year ago

I implemented this feature a few months ago. Can you confirm if it works for you, please?