{"push_id":2152651409,"size":6,"distinct_size":6,"ref":"refs/heads/tt/hydroshare-export-login-backend","head":"9f6b85a7a4241f518e64b3b92248bbc1ffe46764","before":"e7cdc171053a95a0fd315ee06dbc2a475523cc91","commits":[{"sha":"e6032ee0569da7d622bf7f44138c5ea55f87451f","author":{"name":"Terence Tuhinanshu","email":"37569f21d9b480cb23c62806e4f76b2cb2c869bc@azavea.com"},"message":"Add Model, Serializer for HydroShareToken\n\nThe token response from HydroShare's OAuth server has\nthree important fields:\n\n - access_token:  To be used in all OAuth interactions\n - expires_in:    Seconds to expiry from when the token was\n                  generated. Defaults to 30 days.\n - refresh_token: To be used to get a new access_token sans\n                  user input.\n\nWhen a token response is received from HydroShare, we save\nit to the database linking it to the MMW user. All further\ninteractions can be done by looking up the token whenever\na user makes a request.\n\nThe serializer will likely not be used very often, since we\nwouldn't want to expose the tokens. However, while this is\nin development, it is a handy convenience for inspection.\n\n:construction: :card_file_box:","distinct":true,"url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/commits/e6032ee0569da7d622bf7f44138c5ea55f87451f"},{"sha":"4f6857f391b073f2e99ff6627efa2347ad61148e","author":{"name":"Terence Tuhinanshu","email":"37569f21d9b480cb23c62806e4f76b2cb2c869bc@azavea.com"},"message":"Add HydroShare settings, environment variables\n\nThese will initialize the running environment for HydroShare\nintegration.\n\n:sparkles: :wrench:","distinct":true,"url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/commits/4f6857f391b073f2e99ff6627efa2347ad61148e"},{"sha":"76a259c4c2ddf62e44b818c4352c75081152c0a8","author":{"name":"Terence Tuhinanshu","email":"37569f21d9b480cb23c62806e4f76b2cb2c869bc@azavea.com"},"message":"Add library for interacting with HydroShare\n\nDocumentation: http://hs-restclient.readthedocs.io/\nSource: https://github.com/hydroshare/hs_restclient\n\n:heavy_plus_sign:","distinct":true,"url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/commits/76a259c4c2ddf62e44b818c4352c75081152c0a8"},{"sha":"4d355e9322bba8bed4c0f423c53b443ba2456b85","author":{"name":"Terence Tuhinanshu","email":"37569f21d9b480cb23c62806e4f76b2cb2c869bc@azavea.com"},"message":"Add HydroShareService module\n\nIn many ways similar to the ItsiService module, this extends\nOAuth2Service and allows OAuth interaction. Furthermore, it\nalso interacts with the HydroShareToken models and can make\na HydroShare rest client, initialized to the right settings.\n\nThere are a few TODO items here, not implemented here for\nthey may be handled outside these functions in the views.\nSince those views are still to be written, and this part\ncan possibly change, these items are left as comments.\n\n:construction: :hankey:","distinct":true,"url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/commits/4d355e9322bba8bed4c0f423c53b443ba2456b85"},{"sha":"2310bf95302b96323cee5faf1ad05740a65e0933","author":{"name":"Terence Tuhinanshu","email":"37569f21d9b480cb23c62806e4f76b2cb2c869bc@azavea.com"},"message":"Add HydroShare login endpoints\n\nFor authenticated users, we allow connecting their MMW account to\na HydroShare account. The retrieved credentials, which include an\naccess_token and refresh_token, are saved to the database.\n\nThis is facilitated via two endpoints which perform the OAuth\ndance:\n\n - /user/hydroshare/login:\n   Generates a redirect URI using the app credentials and sends\n   the user there to login and give MMW read write permissions.\n\n - /user/hydroshare/authorize:\n   Receives the authorization code from HydroShare and uses it\n   to retrieve access tokens, then saves them to the database.\n\nCurrently the authorize endpoint also shows the saved token in an\nAPI View for demonstration purposes, but this will be replaced by\na template that sends an HTML5 postMessage that the original page\nwhich triggered the request is listening for.\n\n:sparkles:","distinct":true,"url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/commits/2310bf95302b96323cee5faf1ad05740a65e0933"},{"sha":"9f6b85a7a4241f518e64b3b92248bbc1ffe46764","author":{"name":"Terence Tuhinanshu","email":"37569f21d9b480cb23c62806e4f76b2cb2c869bc@azavea.com"},"message":"Add Testing Endpoints\n\nThese endpoints demonstrate:\n\n - /user/hydroshare/refresh:\n   Shows how a mortal access_token can be refreshed without the\n   user having to log in again by using the refresh_token to get\n   a new set of tokens, which are saved again.\n\n - /user/hydroshare/example:\n   Shows that the procured tokens actually work against the\n   HydroShare API by fetching a list of resources visible to the\n   logged in user. Currently there should be exactly 1 \"Test\n   Resource\" for the sample model-my-watershed user on the\n   dev.hydroshare.org website.\n\nThese endpoints should be removed before merging.\n\n:hankey:","distinct":true,"url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/commits/9f6b85a7a4241f518e64b3b92248bbc1ffe46764"}]}
{"actor":{"display_login":"rajadain"}}