ciecplib.cookies module

Cookie handling for SAML ECP authentication

class ciecplib.cookies.ECPCookieJar(filename=None, delayload=False, policy=None)

Bases: RequestsCookieJar, MozillaCookieJar

Custom cookie jar that stores cookies in the cURL format.

save(filename=None, ignore_discard=False, ignore_expires=False)

Save cookies to a file.

Returns s session cookie for the given URL from the jar

Parameters:
Returns:

cookie (http.cookiejar.Cookie) – the relevant cookie

Raises:

ValueError – if no appropriate cookie is found

ciecplib.cookies.has_session_cookies(jar, url)

Returns True if the given cookie jar has a session cookie we can use

Parameters:
Returns:

can_reuse (bool) – True if any cookie in the jar is a non-expiring shibsession cookie for the given same domain as url

ciecplib.cookies.load_cookiejar(cookiefile, strict=True, ignore_discard=True, ignore_expires=True)

Load a cookie jar from a file

Parameters: