adapted shibboleth login for FAU (slightly different POST url and payload)

This commit is contained in:
NIKL45 2025-10-19 00:21:53 +02:00
parent 2c22794c69
commit ac7bf13656

View file

@ -60,16 +60,15 @@ class FauShibbolethLogin:
# Equivalent: Enter credentials in # Equivalent: Enter credentials in
# https://idp.scc.kit.edu/idp/profile/SAML2/Redirect/SSO # https://idp.scc.kit.edu/idp/profile/SAML2/Redirect/SSO
url = str(shib_url.origin()) + action if action.startswith("https"): # FAU uses full URL here
url = action
else:
url = str(shib_url.origin()) + action #KIT uses relative URL here
username, password = await self._auth.credentials() username, password = await self._auth.credentials()
data = { data = {
"_eventId_proceed": "", "username": username,
"j_username": username, "password": password
"j_password": password,
"fudis_web_authn_assertion_input": "",
} }
if csrf_token_input := form.find("input", {"name": "csrf_token"}):
data["csrf_token"] = csrf_token_input["value"] # type: ignore
soup = await _post(sess, url, data) soup = await _post(sess, url, data)
if soup.find(id="attributeRelease"): if soup.find(id="attributeRelease"):