mirror of
https://github.com/Garmelon/PFERD.git
synced 2026-04-12 15:35:05 +02:00
Send CSRF token to Shibboleth
This commit is contained in:
parent
9b048a9cfc
commit
2714ac6be6
1 changed files with 3 additions and 0 deletions
|
|
@ -74,6 +74,8 @@ class KitShibbolethAuthenticator(IliasAuthenticator):
|
|||
form = soup.find("form", {"class": "full content", "method": "post"})
|
||||
action = form["action"]
|
||||
|
||||
csrf_token = form.find("input", {"name": "csrf_token"})["value"]
|
||||
|
||||
# Equivalent: Enter credentials in
|
||||
# https://idp.scc.kit.edu/idp/profile/SAML2/Redirect/SSO
|
||||
LOGGER.debug("Attempt to log in to Shibboleth using credentials")
|
||||
|
|
@ -82,6 +84,7 @@ class KitShibbolethAuthenticator(IliasAuthenticator):
|
|||
"_eventId_proceed": "",
|
||||
"j_username": self._auth.username,
|
||||
"j_password": self._auth.password,
|
||||
"csrf_token": csrf_token
|
||||
}
|
||||
soup = soupify(sess.post(url, data=data))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue