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
Implement authorization on geocaching.su #7170
Conversation
Can one of the admins verify this patch? |
I deleted the comments |
ok to test |
ok to test |
Build finished. |
retest this please |
Build finished. |
@Lineflyer please add actual valid production Geocaching.su keys I sent before to keys.xml used in build |
Build finished. |
1 similar comment
Build finished. |
Build finished. |
3 similar comments
Build finished. |
Build finished. |
Build finished. |
To give you a heads-up, I started to look at the PR. I will start putting out remarks tomorrow. |
@rsudev I just sent keys again to cgeo support mail. I was not able to quickly find way to message you directly, but feel free to provide a communication method to send you this directly |
@Lineflyer @rsudev I improved OAuth part a bit to shorten the code and removed re-invented wheels, if there are more comments there let us continue improvements later there. |
@rsudev If you do not object today, I will merge this new connector tomorrow to give it a test in our nightlies. |
@okainov Can you rebase one more time? Recent commits produced a conflict. |
Some OAuth servers implementation do not accept oauth_token parameter when it's empty, so ther eis no need to send empty option
Methods getTokenPublicPrefKeyId() and getTokenSecretPrefKeyId() are going to be reused in non-OC connectors, so let's create interface for general OAuth-capable connector
Instead of using hardcoded OC-only keys, get them dynamically Fixes: cgeo#7184
This class is being used outside of OC package, so need public access to its constructor.
- Implement SU Authorization activity - Implement SUParser and tests - Use new API for searching by geocode and map
Proper OAuth requires to do not store user credentials and to use tokens instead. - Changed SUAuthorizationActivity from Credentials-capable to OAuth-capable activity - Removed SuLogin and use OAuthAuthorizationActivity instead - Add User API call to get current user
Explicitly declare and catch possible exceptions during SuApi calls
Current behavior does not allow to have simple LoggingManager without implementing LoaderManager. See cgeo#7188
Caches loaded with old API didn't contain cache ID. However it's the main identifier on SU, and it can be easily computed from geocode. So, to avoid asking users to refresh all their caches it's easier to add this small fix.
Also, do not put all images in description, but only cache photo
@Lineflyer done |
This is a big one. Lets test. @okainov |
@Lineflyer you've squashed all my pretty commit history that I was trying to keep as neat as possible :( Can I have label near my nick or my PRs "please don't squash"? Nevertheless, finally, hoorray! Thanks! |
Regarding the squashing: Regarding the final merge now: |
BTW: |
I think this shouldn't be applied for so huge changesets and when author has neat commit history, I think we had similar discussion with @rsudev somewhere in my previous PR. I'd be glad to organize my commits if they're not neat enough for you, but in the future I'd prefer to have them merged without squashing, because I try to separate them to logically independent parts for ease of tracking.
Feel free to spam in my caches: |
OAuthAuthorizationActivity
Implements #5269