Skip to content

Commit

Permalink
Merge pull request #846 from longguikeji/feature-fix-oauth2-tenant
Browse files Browse the repository at this point in the history
fix: 🐛 fix oatuh2 request tenant
  • Loading branch information
luolu-lg authored May 20, 2022
2 parents f71f40b + 4401912 commit 335ddc8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions oauth2_provider/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,13 @@ def check_token(self, request, *args, **kwargs):
if token:
if not token.user.is_active:
return False

if not request.tenant:
return False

request.user = token.user
request.user.tenant = request.tenant

if token.expired(tenant=request.tenant):
return False
user = token.user
Expand Down

0 comments on commit 335ddc8

Please sign in to comment.