PKC€8“Χ2EGG-INFO/dependency_links.txt PKC€8$χ M22EGG-INFO/entry_points.txt[trac.plugins] traccas.traccas = traccas.traccas PKC€8 η BBEGG-INFO/PKG-INFOMetadata-Version: 1.0 Name: TracCAS Version: 2.0 Summary: A modified authentication plugin to use the Yale CAS system. Home-page: http://trac-hacks.org/wiki/TracCASPlugin Author: Noah Kantrowitz Author-email: noah@coderanger.net License: BSD Description: UNKNOWN Keywords: trac plugin cas authentication Platform: UNKNOWN PKC€8Σ‘šEGG-INFO/requires.txtTracPKC€8†qhσύύEGG-INFO/SOURCES.txtsetup.py TracCAS.egg-info/PKG-INFO TracCAS.egg-info/SOURCES.txt TracCAS.egg-info/dependency_links.txt TracCAS.egg-info/entry_points.txt TracCAS.egg-info/requires.txt TracCAS.egg-info/top_level.txt traccas/__init__.py traccas/pycas.py traccas/traccas.py PKC€8²j΄―EGG-INFO/top_level.txttraccas PKC€8“Χ2EGG-INFO/zip-safe PK‘š€8Ίρrtraccas/__init__.pyfrom traccas import * PKC€8΄ ΄ traccas/pycas.pyc;ς ίDHc@s,dkZdkZdefd„ƒYZdS(NsPyCAScBsAtZdZed„Zd„Zed„Zd„Zd„Z RS(s&A class for working with a CAS server.cKsJ||_||_hdd<dd<dd<|_|ii|ƒdS(Ns login_paths/logins logout_paths validate_paths /validate(surlsselfsrenewspathssupdateskwords(sselfsurlsrenewskwords((s3build/bdist.darwin-8.11.1-i386/egg/traccas/pycas.pys__init__s  $cCsE|i|iddti|ƒ}|io|d7}n|SdS(s+Return the login URL for the given service.s login_paths ?service=s &renew=trueN(sselfsurlspathssurllibs quote_plussservicesbasesrenew(sselfsservicesbase((s3build/bdist.darwin-8.11.1-i386/egg/traccas/pycas.pys login_urls % cCs>|i|id}|o|dti|ƒ7}n|SdS(sReturn the logout URL.s logout_paths?url=N(sselfsurlspathssbasesurllibs quote_plus(sselfsurlsbase((s3build/bdist.darwin-8.11.1-i386/egg/traccas/pycas.pys logout_urls cCsV|i|iddti|ƒdti|ƒ}|io|d7}n|SdS(s>Return the validation URL for the given service. (For CAS 1.0)s validate_paths ?service=s&ticket=s &renew=trueN( sselfsurlspathssurllibs quote_plussservicesticketsbasesrenew(sselfsservicesticketsbase((s3build/bdist.darwin-8.11.1-i386/egg/traccas/pycas.pys validate_url s 6 cCsYti|i||ƒƒ}|iƒ}|i ƒdj}|iƒi ƒ}||fSdS(s4Validate the given ticket against the given service.syesN( surllib2surlopensselfs validate_urlsservicesticketsfsreadlinesvalidsstripsuser(sselfsservicesticketsfsvalidsuser((s3build/bdist.darwin-8.11.1-i386/egg/traccas/pycas.pysvalidate_ticket's  ( s__name__s __module__s__doc__sFalses__init__s login_urlsNones logout_urls validate_urlsvalidate_ticket(((s3build/bdist.darwin-8.11.1-i386/egg/traccas/pycas.pysPyCASs    (surllibsurllib2sobjectsPyCAS(surllib2surllibsPyCAS((s3build/bdist.darwin-8.11.1-i386/egg/traccas/pycas.pys?sPKHœ€8nΓ΄1? ? traccas/traccas.py# CASified login module for Trac from trac.core import * from trac.config import Option from trac.web.api import IAuthenticator, IRequestHandler from trac.web.chrome import INavigationContributor from trac.util import escape, hex_entropy, Markup from trac.web.auth import LoginModule from genshi.builder import tag from pycas import PyCAS class CasLoginModule(LoginModule): """A CAS-based login module.""" server = Option('cas', 'server', doc='Base URL for the CAS server') login_path = Option('cas', 'login_path', default='/login', doc='Path component for the login system') logout_path = Option('cas', 'logout_path', default='/logout', doc='Path component for the logout system') validate_path = Option('cas', 'validate_path', default='/validate', doc='Path component for the validation system') # IAuthenticatorMethods def authenticate(self, req): ticket = req.args.get('ticket') if ticket: valid, user = self.cas.validate_ticket(req.abs_href.login(), ticket) if valid: req.environ['REMOTE_USER'] = user return super(CasLoginModule, self).authenticate(req) # INavigationContributor methods def get_navigation_items(self, req): if req.authname and req.authname != 'anonymous': yield 'metanav', 'login', 'logged in as %s' % req.authname yield 'metanav', 'logout', tag.a('Logout', href=req.href.logout()) else: yield 'metanav', 'login', tag.a('Login', href=self.cas.login_url(req.abs_href.login())) # Internal methods def _do_login(self, req): if not req.remote_user: req.redirect(self.cas.login_url(req.abs_href.login())) super(CasLoginModule, self)._do_login(req) def _do_logout(self, req): if req.authname: super(CasLoginModule, self)._do_logout(req) req.redirect(self.cas.logout_url(req.abs_href())) else: req.redirect(req.abs_href()) def cas(self): paths = { 'login_path': self.login_path, 'logout_path': self.logout_path, 'validate_path': self.validate_path, } return PyCAS(self.server, **paths) cas = property(cas) PKC€8ΰήΞCCtraccas/traccas.pyc;ς ψGHc@sŽdkTdklZdklZlZdklZdkl Z l Z l Z dk l Z dklZdklZde fd „ƒYZd S( (s*(sOption(sIAuthenticatorsIRequestHandler(sINavigationContributor(sescapes hex_entropysMarkup(s LoginModule(stag(sPyCASsCasLoginModulecBs­tZdZeddddƒZeddddddƒZedd dd dd ƒZedd dd ddƒZd„Zd„Z d„Z d„Z d„Z e e ƒZ RS(sA CAS-based login module.scassserversdocsBase URL for the CAS servers login_pathsdefaults/logins#Path component for the login systems logout_paths/logouts$Path component for the logout systems validate_paths /validates(Path component for the validation systemcCss|iidƒ}|o@|ii|iiƒ|ƒ\}}|o||i dhd|i<d|i<d|i<}t|i|SdS(Ns login_paths logout_paths validate_path(sselfs login_paths logout_paths validate_pathspathssPyCASsserver(sselfspaths((s5build/bdist.darwin-8.11.1-i386/egg/traccas/traccas.pyscas7s*(s__name__s __module__s__doc__sOptionsservers login_paths logout_paths validate_paths authenticatesget_navigation_itemss _do_logins _do_logoutscassproperty(((s5build/bdist.darwin-8.11.1-i386/egg/traccas/traccas.pysCasLoginModule s        N(s trac.cores trac.configsOptions trac.web.apisIAuthenticatorsIRequestHandlerstrac.web.chromesINavigationContributors trac.utilsescapes hex_entropysMarkups trac.web.auths LoginModulesgenshi.builderstagspycassPyCASsCasLoginModule( sIAuthenticatorsINavigationContributorsOptionsIRequestHandlersCasLoginModulesMarkups LoginModulesPyCASs hex_entropystagsescape((s5build/bdist.darwin-8.11.1-i386/egg/traccas/traccas.pys?s     PKC€8“Χ2€EGG-INFO/dependency_links.txtPKC€8$χ M22€<EGG-INFO/entry_points.txtPKC€8 η BB€₯EGG-INFO/PKG-INFOPKC€8Σ‘š€EGG-INFO/requires.txtPKC€8†qhσύύ€MEGG-INFO/SOURCES.txtPKC€8²j΄―€|EGG-INFO/top_level.txtPKC€8“Χ2€ΈEGG-INFO/zip-safePK‘š€8Ίρr€θtraccas/__init__.pyPKC€8΄ ΄ €H traccas/pycas.pycPKHœ€8nΓ΄1? ? €+traccas/traccas.pyPKC€8ΰήΞCC€štraccas/traccas.pycPK Z/