Skip to content

Commit

Permalink
maint: remove no longer needed fix for jupyterhub 0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Jun 30, 2023
1 parent fe4d317 commit 8e77c89
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions oauthenticator/oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,26 +197,6 @@ def get_next_url(self, user=None):
return super().get_next_url(user)
return url_path_join(self.hub.server.base_url, "home")

async def _login_user_pre_08(self):
"""login_user simplifies the login+cookie+auth_state process in JupyterHub 0.8
_login_user_07 is for backward-compatibility with JupyterHub 0.7
"""
user_info = await self.authenticator.get_authenticated_user(self, None)
if user_info is None:
return
if isinstance(user_info, dict):
username = user_info["name"]
else:
username = user_info
user = self.user_from_username(username)
self.set_login_cookie(user)
return user

if not hasattr(BaseHandler, "login_user"):
# JupyterHub 0.7 doesn't have .login_user
login_user = _login_user_pre_08

async def get(self):
self.check_arguments()
user = await self.login_user()
Expand Down

0 comments on commit 8e77c89

Please sign in to comment.