aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2020-04-12 10:25:23 +0200
committerneodarz <neodarz@neodarz.net>2020-04-12 10:25:23 +0200
commitcc1e4a3629e16d8d68c55e07c9e99c92c5814549 (patch)
tree8181e5c31b1093535a7e001b13584245b06e3cbb
parenta566d53fc7f724309607d0f8ec6f68f698a544da (diff)
downloadpyfunkwhale-cc1e4a3629e16d8d68c55e07c9e99c92c5814549.tar.xz
pyfunkwhale-cc1e4a3629e16d8d68c55e07c9e99c92c5814549.zip
Add a function to force the refresh of the OAuth2 token
Diffstat (limited to '')
-rw-r--r--pyfunkwhale/client.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pyfunkwhale/client.py b/pyfunkwhale/client.py
index cf19673..c6ef1f2 100644
--- a/pyfunkwhale/client.py
+++ b/pyfunkwhale/client.py
@@ -76,6 +76,13 @@ class Client(object):
self._get_token()
write_file(self.token_filename, self.token)
+ def _force_refresh_token(self):
+ """
+ Force the refresh of the OAuth2 token
+ """
+ self._get_token()
+ write_file(self.token_filename, self.token)
+
def _get_JWT_token(self):
"""
Get a JWT token.