Skip to content

Commit

Permalink
Add refresh token to client instance
Browse files Browse the repository at this point in the history
---------

Co-authored-by: C Davis <[email protected]>
Co-authored-by: Iacopo Spalletti <[email protected]>
  • Loading branch information
3 people authored Apr 23, 2023
1 parent 284f825 commit 438dbb5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/114.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add refresh token support to tests/resources/auth_users_success.json
1 change: 1 addition & 0 deletions taiga/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def auth(self, username, password):
if response.status_code != 200:
raise exceptions.TaigaRestException(full_url, response.status_code, response.text, "POST")
self.token = response.json()["auth_token"]
self.token_refresh = response.json()["refresh"]
self.raw_request = RequestMaker("/api/v1", self.host, self.token, "Bearer", self.tls_verify)
self._init_resources()

Expand Down
1 change: 1 addition & 0 deletions tests/resources/auth_user_success.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"big_photo":"http://taiga/media/user/b/1/3/1/r2d2android2.png.300x300_q85_crop.jpg",
"full_name":"Andrea Stagi",
"auth_token":"f4k3",
"refresh":"j5l4",
"default_timezone":""
}

0 comments on commit 438dbb5

Please sign in to comment.