mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Send CSRF token to Shibboleth
This commit is contained in:
parent
9b048a9cfc
commit
2714ac6be6
@ -74,6 +74,8 @@ class KitShibbolethAuthenticator(IliasAuthenticator):
|
|||||||
form = soup.find("form", {"class": "full content", "method": "post"})
|
form = soup.find("form", {"class": "full content", "method": "post"})
|
||||||
action = form["action"]
|
action = form["action"]
|
||||||
|
|
||||||
|
csrf_token = form.find("input", {"name": "csrf_token"})["value"]
|
||||||
|
|
||||||
# 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
|
||||||
LOGGER.debug("Attempt to log in to Shibboleth using credentials")
|
LOGGER.debug("Attempt to log in to Shibboleth using credentials")
|
||||||
@ -82,6 +84,7 @@ class KitShibbolethAuthenticator(IliasAuthenticator):
|
|||||||
"_eventId_proceed": "",
|
"_eventId_proceed": "",
|
||||||
"j_username": self._auth.username,
|
"j_username": self._auth.username,
|
||||||
"j_password": self._auth.password,
|
"j_password": self._auth.password,
|
||||||
|
"csrf_token": csrf_token
|
||||||
}
|
}
|
||||||
soup = soupify(sess.post(url, data=data))
|
soup = soupify(sess.post(url, data=data))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user