Skip to content

Commit 5012c41

Browse files
Revert "Fix login issue (#297)"
This reverts commit b81181d.
1 parent b26d36d commit 5012c41

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
lines changed

src/handlers/api.py

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,12 @@ class BaseHandler(BioThingsAuthnMixin, BaseAPIHandler):
4848

4949
class AuthHandler(BaseHandler):
5050
def set_cache_header(self, cache_value):
51-
# disable cache for auth-related handlers
51+
# disabel cache for auth-related handlers
5252
self.set_header("Cache-Control", "private, max-age=0, no-cache")
5353

5454

5555
class UserInfoHandler(AuthHandler):
56-
""" "Handler for /user endpoint."""
57-
name = "user_info"
58-
kwargs = {
59-
"GET": {} # Explicitly empty - no parameters expected or required
60-
}
56+
""" "Handler for /user_info endpoint."""
6157

6258
def get(self):
6359
# Check for user cookie
@@ -77,27 +73,11 @@ def get(self):
7773

7874

7975
class LoginHandler(AuthHandler):
80-
""" "Handler for /login endpoint."""
81-
name = "user_login"
82-
kwargs = {
83-
"GET": {
84-
"next": {"type": str, "required": False, "default": "/"} # Redirect URL
85-
}
86-
}
87-
8876
def get(self):
8977
self.redirect(self.get_argument("next", "/"))
9078

9179

9280
class LogoutHandler(AuthHandler):
93-
""" "Handler for /logout endpoint."""
94-
name = "user_logout"
95-
kwargs = {
96-
"GET": {
97-
"next": {"type": str, "required": False, "default": "/"} # Redirect URL
98-
}
99-
}
100-
10181
def get(self):
10282
self.clear_cookie("user")
10383
self.redirect(self.get_argument("next", "/"))

src/handlers/oauth.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77

88

99
class GitHubLoginHandler(BaseAPIHandler, GithubOAuth2Mixin):
10-
""" "Handler for GitHub oauth login: /oauth endpoint"""
11-
name = "github_oauth"
10+
""" "Handler for GitHub oauth login"""
1211

1312
SCOPES = []
1413
GITHUB_CALLBACK_PATH = "/oauth"

0 commit comments

Comments
 (0)