Mercurial > p > roundup > code
diff roundup/mailgw.py @ 7081:f918351a0fe6
Put oauth client secret into a file
.. and get rid of the -I option of the mailgw script.
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Sat, 26 Nov 2022 11:32:12 +0100 |
| parents | 3359dc1dabb0 |
| children | 357e185752ed |
line wrap: on
line diff
--- a/roundup/mailgw.py Fri Nov 25 23:16:00 2022 -0500 +++ b/roundup/mailgw.py Sat Nov 26 11:32:12 2022 +0100 @@ -1462,8 +1462,10 @@ """ with open(os.path.join(self.oauth_path, 'client_secret'), 'r') as f: client_secret = f.read().strip() + with open(os.path.join(self.oauth_path, 'client_id'), 'r') as f: + client_id = f.read().strip() data = dict \ - ( client_id = self.oauth_client_id + ( client_id = client_id , client_secret = client_secret , refresh_token = self.refresh_token , grant_type = 'refresh_token' @@ -1514,7 +1516,6 @@ # The following are mandatory for oauth and are passed by # the command-line handler: self.token_endpoint = kw ['token_endpoint'] - self.oauth_client_id = kw ['oauth_client_id'] for k in range(2): t = self.access_token s = 'user=%s\1auth=Bearer %s\1\1' % (user, t)
