-
Notifications
You must be signed in to change notification settings - Fork 42
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
Prepare for HTTP Basic Auth deprecation #144
Comments
Here is an example for Google OAuth2 using So it's possible to create a session object with OAuth (e.g. |
@matkoniecz I finally got the time to create an example using OAuth 2.0 (see PR #149). |
There is now an example here: https://github.com/metaodi/osmapi/blob/develop/examples/oauth2.py |
Do I need to do this on every script run? And if user can save |
@matkoniecz I should test that. But in theory the token should be valid for some time. |
some? So I will need to keep going through this dance manually? Arghhh. Though for some reason they really want to deprecate it per openstreetmap/operations#867 |
openstreetmap/operations#867 (comment) mentions something that may or may not be applicable |
I did a quick test, and currently the tokens do not have an expiry date, so it seems you can use a token forever unless a user revokes it (e.g. here https://master.apis.dev.openstreetmap.org/oauth2/authorized_applications). So you have to do this dance once, save the token and then reuse it instead of username/password. |
Here is a gist of the script I use: https://gist.github.com/metaodi/df380794ba00df5e73423682231e9ba2 |
Since I added a new (more realistic) example script incl. saving and re-using a token, I consider this issue as resolved. |
https://www.openstreetmap.org/user/pnorman/diary/401157
it seems that it is not happening soon but...
#113 (comment)
The text was updated successfully, but these errors were encountered: