{"action":"created","issue":{"url":"https://api.github.com/repos/keboola/docker-bundle/issues/221","repository_url":"https://api.github.com/repos/keboola/docker-bundle","labels_url":"https://api.github.com/repos/keboola/docker-bundle/issues/221/labels{/name}","comments_url":"https://api.github.com/repos/keboola/docker-bundle/issues/221/comments","events_url":"https://api.github.com/repos/keboola/docker-bundle/issues/221/events","html_url":"https://github.com/keboola/docker-bundle/issues/221","id":277371717,"number":221,"title":"OAuth Integration - Refresh token update","user":{"login":"Halama","id":903531,"avatar_url":"https://avatars3.githubusercontent.com/u/903531?v=4","gravatar_id":"","url":"https://api.github.com/users/Halama","html_url":"https://github.com/Halama","followers_url":"https://api.github.com/users/Halama/followers","following_url":"https://api.github.com/users/Halama/following{/other_user}","gists_url":"https://api.github.com/users/Halama/gists{/gist_id}","starred_url":"https://api.github.com/users/Halama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Halama/subscriptions","organizations_url":"https://api.github.com/users/Halama/orgs","repos_url":"https://api.github.com/users/Halama/repos","events_url":"https://api.github.com/users/Halama/events{/privacy}","received_events_url":"https://api.github.com/users/Halama/received_events","type":"User","site_admin":false},"labels":[{"id":158899398,"url":"https://api.github.com/repos/keboola/docker-bundle/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2017-11-28T12:45:24Z","updated_at":"2018-02-02T10:39:51Z","closed_at":null,"author_association":"OWNER","body":"Některé komponenty nemají refresh_tokeny s neomezenou platností. Je potřeba jej pravidelně po použití updatovat. Např. https://developer.intuit.com/docs/0100_quickbooks_online/0100_essentials/000500_authentication_and_authorization/connect_from_within_your_app#/Refreshing_the_access_token\r\n\r\nNový refresh token nemumíme zatím poslat zpět do OAuth komponenty.\r\n\r\n## Jak by to mohlo fungovat\r\n - Komponenta po doběhnutí uloží Oauth response do `/data/out/authorization.json`\r\n - Docker runner vezme výstupní authorization soubor a jeho obsah pošle na nový resource `PATCH /oauth-v2/credentials/{componentId}/{id_credentials}` s telěm:\r\n   - updatne pouze `#data` atribut credentials. Bude posílat v plain textu, zašifruje si to až oauth komponenta v moment příjmu\r\n   - `id_credentials` - vezme se z konfigurace `authorization.oauth_api.id` https://developers.keboola.com/extend/common-interface/oauth/#initialize\r\n```\r\n{\r\n  \"data\": {authorization_content}\r\n}\r\n```\r\n - Docker runner update provede vždy pokud bude `/data/out/authorization.json` nebo by se to mělo řídit nějakým flagem.\r\n\r\n\r\n\r\n  \r\n  \r\n"},"comment":{"url":"https://api.github.com/repos/keboola/docker-bundle/issues/comments/362551147","html_url":"https://github.com/keboola/docker-bundle/issues/221#issuecomment-362551147","issue_url":"https://api.github.com/repos/keboola/docker-bundle/issues/221","id":362551147,"user":{"login":"MiroCillik","id":1488015,"avatar_url":"https://avatars1.githubusercontent.com/u/1488015?v=4","gravatar_id":"","url":"https://api.github.com/users/MiroCillik","html_url":"https://github.com/MiroCillik","followers_url":"https://api.github.com/users/MiroCillik/followers","following_url":"https://api.github.com/users/MiroCillik/following{/other_user}","gists_url":"https://api.github.com/users/MiroCillik/gists{/gist_id}","starred_url":"https://api.github.com/users/MiroCillik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MiroCillik/subscriptions","organizations_url":"https://api.github.com/users/MiroCillik/orgs","repos_url":"https://api.github.com/users/MiroCillik/repos","events_url":"https://api.github.com/users/MiroCillik/events{/privacy}","received_events_url":"https://api.github.com/users/MiroCillik/received_events","type":"User","site_admin":false},"created_at":"2018-02-02T10:39:51Z","updated_at":"2018-02-02T10:39:51Z","author_association":"OWNER","body":"To je prave problem, lebo refresh token casto nema v opdovedi expiraciu. Expirace byva len pri access tokene. Napr. u toho One Drive je to tak. Dalo by sa to spravit tak, ze by si tu expiraciu nastavil pri registacii komponenty spolocne s tym \"refresh\" flagom."}}
{"actor":{"display_login":"MiroCillik"}}