Compare commits

...

2 Commits

Author SHA1 Message Date
Patrick Cloke 654db21db2 Update comment to call-out different flows. 2020-04-02 10:25:47 -04:00
Patrick Cloke f68df97edd
Update comments based on suggestions.
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2020-04-02 10:21:40 -04:00
1 changed files with 15 additions and 9 deletions
synapse/handlers

View File

@ -74,6 +74,7 @@ class CasHandler:
Args:
ticket: The CAS ticket from the client.
service_args: Additional arguments to include in the service URL.
Should be the same as those passed to `get_redirect_url`.
"""
uri = self._cas_server_url + "/proxyValidate"
args = {
@ -149,7 +150,7 @@ class CasHandler:
def get_redirect_url(self, service_args: Dict[str, str]) -> str:
"""
Generates a URL to the CAS server where the client should be redirected.
Generates a URL for the CAS server where the client should be redirected.
Args:
service_args: Additional arguments to include in the final redirect URL.
@ -171,22 +172,27 @@ class CasHandler:
session: Optional[str],
) -> None:
"""
Called once the user has successfully authenticated with the SSO,
validates a CAS ticket sent by the client and completes the login process.
Called once the user has successfully authenticated with the SSO.
Validates a CAS ticket sent by the client and completes the auth process.
Registers the user if necessary, and then returns a redirect (with
a login token) to the client.
If the user interactive authentication session is provided, marks the
UI Auth session as complete, then returns an HTML page notifying the
user they are done.
Otherwise, this registers the user if necessary, and then returns a
redirect (with a login token) to the client.
Args:
request: the incoming request from the browser. We'll
respond to it with a redirect.
respond to it with a redirect or an HTML page.
ticket: The CAS ticket provided by the client.
client_redirect_url: the redirect_url the client gave us when
it first started the process.
client_redirect_url: the redirectUrl parameter from the `/cas/ticket` HTTP request, if given.
This should be the same as the redirectUrl from the original `/login/sso/redirect` request.
session_id: The UI Auth session ID, if applicable.
session: The session parameter from the `/cas/ticket` HTTP request, if given.
This should be the UI Auth session id.
"""
args = {}
if client_redirect_url: