Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
rayluo committed Aug 25, 2024
1 parent b6c9c50 commit 46230c1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
6 changes: 6 additions & 0 deletions identity/flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,9 @@ def call_an_api(*, context):
"""
return super(Auth, self).login_required(function, scopes=scopes)

def _logout(self):
print(self._auth.log_out(self._request.host_url))
print(redirect, self._redirect, self.__class__._redirect)
return self.__class__._redirect(self._auth.log_out(request.host_url))
return redirect(self._auth.log_out(request.host_url))

5 changes: 4 additions & 1 deletion identity/pallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ def __getattribute__(self, name):
return super(PalletAuth, self).__getattribute__(name)

def logout(self):
return self._redirect(self._auth.log_out(self._request.host_url))
print(self._auth.log_out(self._request.host_url))
print(self._redirect, self.__class__._redirect)
return self.__class__._redirect(
self._auth.log_out(self._request.host_url))

def login_required( # Named after Django's login_required
self,
Expand Down
11 changes: 11 additions & 0 deletions identity/quart.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,14 @@ async def call_api(*, context):
"""
return super(Auth, self).login_required(function, scopes=scopes)

def logout(self):
#1/0
return redirect(self._auth.log_out(request.host_url))
print(request.host_url)
print(self._request.host_url)
print(self._auth.log_out(request.host_url))
print(self._auth.log_out(self._request.host_url))
return redirect(self._auth.log_out(request.host_url))
print(redirect, self._redirect, self.__class__._redirect)
return self.__class__._redirect(self._auth.log_out(request.host_url))

0 comments on commit 46230c1

Please sign in to comment.