mirror of
https://github.com/Garmelon/PFERD.git
synced 2026-04-12 07:25:04 +02:00
adapted shibboleth login for FAU (slightly different POST url and payload)
This commit is contained in:
parent
2c22794c69
commit
ac7bf13656
1 changed files with 7 additions and 8 deletions
|
|
@ -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"):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue