Update method names and docstrings for handling tickets.

pull/7186/head
Patrick Cloke 2020-04-01 11:13:10 -04:00
parent d6bbeb3890
commit 49a79fa24f
3 changed files with 5 additions and 5 deletions

View File

@ -172,11 +172,11 @@ class CasHandler:
return "%s/login?%s" % (self._cas_server_url, args)
async def handle_login_request(
async def handle_ticket_for_login(
self, request: SynapseRequest, client_redirect_url: str, ticket: str
) -> None:
"""
Validates a CAS ticket sent by the client for login and authenticates the user with SSO.
Validates a CAS ticket sent by the client and completes the login process.
Registers the user if necessary, and then returns a redirect (with
a login token) to the client.
@ -206,7 +206,7 @@ class CasHandler:
registered_user_id, request, client_redirect_url
)
async def handle_ui_auth_response(
async def handle_ticket_for_ui_auth(
self, request: SynapseRequest, ticket: str, session_id: str
) -> None:
"""

View File

@ -440,7 +440,7 @@ class CasTicketServlet(RestServlet):
async def on_GET(self, request: SynapseRequest) -> None:
client_redirect_url = parse_string(request, "redirectUrl", required=True)
ticket = parse_string(request, "ticket", required=True)
await self._cas_handler.handle_login_request(
await self._cas_handler.handle_ticket_for_login(
request, client_redirect_url, ticket
)

View File

@ -262,7 +262,7 @@ class CasAuthTicketServlet(RestServlet):
# Pull the UI Auth session ID out.
session_id = parse_string(request, "session", required=True)
return await self._cas_handler.handle_ui_auth_response(
return await self._cas_handler.handle_ticket_for_ui_auth(
request, ticket, session_id
)