Skip to content

Commit

Permalink
update readme image
Browse files Browse the repository at this point in the history
  • Loading branch information
tcitry committed Jun 4, 2020
1 parent 6914cb3 commit 7fd6899
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api_permission/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ def process_request(self, request):
if request.user and header_token is not None:
try:
token = header_token.split(' ')
assert len(token) == 2, "token maybe invalid"
token_obj = Token.objects.get(key=token[1])
user = token_obj.user
except Token.DoesNotExist as e:
msg = f"api_permission checker: bearer token invalid: {e}"
msg = f"api_permission checker: bearer token not exists: {e}"
logger.warning(msg)
return self._return_403_res(msg)
except Exception as e:
Expand Down
Binary file modified demo/demo1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/demo2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7fd6899

Please sign in to comment.