Closed jSadoski closed 4 years ago
The code good, there are some lines which has a very wide width, could you please run black .
or is it pipenv run black .
? Iām not familiar with pipenv
I switched back to virtualenv so my env is more in line with the other development here.
Also, did you have a go with storing the credentials in a file? Maybe authenticating using token will be safer because this is using username and password.
I did not go with storing the credentials in a file, yet. That's a feature I'd like to do soon, but I submitted this because it allows the full testing suite to run so we can get cli() tests up ASAP.
I agree tokens are better. Right now, GitHub allows authentication using 'username:token' OR 'username:password' in the request header. GitHub is deprecating 'username:password' on November 13 of this year. This code was intended to be used with a personal access token, but since GitHub allows the password in the header, the request is being authenticated when the password is used, too. I think we could sort of check to make sure the token is being used by checking the length of the the string passed, unless of course their password were the same length as a token.
Otherwise, instead of basic authentication, we could go straight to implementing OAuth2 Device Flow instead. This would save users the step of generating a personal token and would be more secure.
@allcontributors please add @jSadoski for code
@hedythedev
I've put up a pull request to add @jSadoski! :tada:
Context
Resolves #68
Description
Allows personal token using
starcli --auth *username:password*
. Validates option & provides a message if submitted in the wrong format. Thestatus_action
forhttp_code_handling['401']
was changed to a newstatus_action
: unauthorized. DEBUG output was also added for the option šP.S. I ran the tests with this and I was able to complete them all! It seems the auth + the new retry technique is working.