Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
ciecplib 0.9.0
ciecplib 0.9.0
  • Installation

Modules

  • ciecplib
    • get
    • get_cert
    • get_cookie
    • head
    • post
    • Session
  • ciecplib.cookies
    • extract_session_cookie
    • has_session_cookies
    • load_cookiejar
    • ECPCookieJar
  • ciecplib.kerberos
    • find_principal
    • has_credential
    • realm
  • ciecplib.utils
    • get_ecpcookie_path
    • get_idp_url
    • get_idps
    • get_x509_proxy_path
    • random_string
    • EcpIdentityProvider
  • ciecplib.x509
    • check_cert
    • generate_proxy
    • load_cert
    • load_pkcs12
    • print_cert_info
    • time_left
    • write_cert

Command-line scripts

  • ecp-cert-info
  • ecp-curl
  • ecp-get-cert
  • ecp-get-cookie
Back to top
View this page

get_cookie¶

ciecplib.get_cookie(url, endpoint=None, username=None, kerberos=False, debug=False, session=None)¶

Create a SAML/ECP session cookie valid for the given URL.

Parameters:
  • url (str) – the target URL/domain

  • endpoint (str, optional) – the identity provider URL

  • username (str, optional) – the username to use when authenticating

  • kerberos (bool, optional) – if True use an existing kerberos TGT to authenticate

  • debug (bool, optional) – if True enable verbose debugging from requests, currently unused

  • session (requests.Session, optional) – an active requests.Session to use with the query

  • return_all (bool, optional) – return all cookies from the authentication request

Returns:

cookie (http.cookiejar.Cookie) – the newly-minted session cookie

Next
head
Previous
get_cert
Copyright © 2025, Cardiff University
Made with Sphinx and @pradyunsg's Furo
On this page
  • get_cookie
    • get_cookie()