New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebAPI V2 #29
Conversation
To keep it simple, I removed support for saving tokens to file for now. I will add that back in later. |
Cherry picked @tuxuser work on vcrpy conversion and will start converting tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See requested changes. Most changes are needed for a greater flexibility.
xbox/webapi/scripts/authenticate.py
Outdated
|
||
CLIENT_ID = os.environ["CLIENT_ID"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, passing it via environment variables is what you usually do in production software when it comes to passing such configuration parameters.
Does it work the same in windows tho?
Like: CLIENT_ID="123" CLIENT_SECRET="321" xbox-authenticate
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't do all-in-one in Windows, but can use setx CLIENT_ID "12368654"
and it will be available in subsequent command prompts. Of course there is also a GUI way of doing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer reintroducing argparse then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can do both. Default env, override argparse.
In VSCode I use a .env file and running the script automatically loads it for me when testing, so it's more convenient than having to keep typing it or copy/paste.
…SON model definition
Note: We still haven't converted the |
edit - moved TODO to the top so we can edit and check off/add others as we go without losing it. |
…stead of secs since epoch
This is a working draft for a major version increment based off of #17, except it adds true OAuth2 support instead of web scraping for authentication.
To test, register a new application in Azure AD and add
http://localhost:8080/auth/callback
as a redirect URL. Then generate a client secret. SetCLIENT_ID
andCLIENT_SECRET
env vars and runxbox-authenticate
.To do:
no_cll_vec: bool
for Session.request