Skip to content
Merged
2 changes: 2 additions & 0 deletions oscar_python/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ def remove_service(self, name):
return utils.make_request(self, _SVC_PATH+"/"+name, _DELETE)

def _get_token(self, svc):
if self._AUTH_TYPE != 'basicauth':
return self.get_access_token()
service = utils.make_request(self, _SVC_PATH+"/"+svc, _GET)
service = json.loads(service.text)
return service["token"]
Expand Down