SAML auth isn't done until we've gotten the username and cookie headers specifically (ping #2)
This commit is contained in:
parent
ff4d825290
commit
f923c1247c
@ -24,6 +24,7 @@ class SAMLLoginView:
|
|||||||
# API reference: https://lazka.github.io/pgi-docs/#WebKit2-4.0
|
# API reference: https://lazka.github.io/pgi-docs/#WebKit2-4.0
|
||||||
|
|
||||||
self.success = False
|
self.success = False
|
||||||
|
self.saml_result = {}
|
||||||
self.verbose = verbose
|
self.verbose = verbose
|
||||||
|
|
||||||
self.ctx = WebKit2.WebContext.get_default()
|
self.ctx = WebKit2.WebContext.get_default()
|
||||||
@ -65,10 +66,13 @@ class SAMLLoginView:
|
|||||||
if (name.startswith('saml-') or name in ('prelogin-cookie', 'portal-userauthcookie')):
|
if (name.startswith('saml-') or name in ('prelogin-cookie', 'portal-userauthcookie')):
|
||||||
t.append((name, value))
|
t.append((name, value))
|
||||||
h.foreach(listify)
|
h.foreach(listify)
|
||||||
self.saml_result = d = dict(l)
|
d = dict(l)
|
||||||
if d:
|
if d and self.verbose:
|
||||||
if self.verbose:
|
print("Got SAML result headers: %r" % d, file=stderr)
|
||||||
print("Got SAML relevant headers, done: %r" % d, file=stderr)
|
d = self.saml_result
|
||||||
|
d.update(dict(l))
|
||||||
|
if 'saml-username' in d and ('prelogin-cookie' in d or 'portal-userauthcookie' in d):
|
||||||
|
print("Got all required SAML headers, done.", file=stderr)
|
||||||
self.success = True
|
self.success = True
|
||||||
Gtk.main_quit()
|
Gtk.main_quit()
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user