Skip to content
brianwebb edited this page Feb 7, 2011 · 7 revisions

sibboleth (Python)

Usage

Retrieving a list of identity providers from a slcs server: from sibboleth.credentials import CredentialManager, Idp from sibboleth.shibboleth import Shibboleth

    idp = TaskbarIdp()
    c = TaskbarCredMgr()
    cj = MozillaCookieJar()
    shibopener = Shibboleth(idp, c, cj)
    try:
        slcsresp = shibopener.openurl("https://slcstest.arcs.org.au/SLCS/login")
    except (Exception):
        pass
    idps = shibopener.idp.get_idps()

class TaskbarIdp(Idp): def prompt(self, controller): return controller.run()

def get_idps(self):
    return self.idps

def set_idp(self, idp):
    self.idp = idp

class TaskbarCredMgr(CredentialManager): def prompt(self, controller): return controller.run()

Examples

Clone this wiki locally