Beispiel #1
0
 def _get_fasclient(self):
     ctx = stack.top
     if not hasattr(ctx, 'fasclient'):
         ctx.fasclient = FasProxyClient(
             base_url=self.config['base_url'],
             useragent=self.config['user_agent'],
             insecure=not self.config['check_cert'])
     return ctx.fasclient
Beispiel #2
0
 def fasclient(self):
     ctx = stack.top
     if not hasattr(ctx, 'fasclient'):
         ctx.fasclient = FasProxyClient(
             base_url=self.app.config['FAS_BASE_URL'],
             useragent=self.app.config['FAS_USER_AGENT'],
             insecure=not self.app.config['FAS_CHECK_CERT'],
         )
     return ctx.fasclient
Beispiel #3
0
    def __init__(self,
                 url,
                 insecure=False,
                 session_cookie='tg-visit',
                 ssl_cookie=True,
                 httponly=True):
        self.url = url
        self.insecure = insecure
        self.fas = FasProxyClient(url, insecure=insecure)
        self.session_cookie = session_cookie
        self.ssl_cookie = ssl_cookie
        self.httponly = httponly
        self._session_cache = {}
        self._metadata_plugins = []

        for entry in pkg_resources.iter_entry_points(
                'fas.repoze.who.metadata_plugins'):
            self._metadata_plugins.append(entry.load())
Beispiel #4
0
 def on_enable(self):
     super(LoginManager, self).on_enable()
     self.fpc = FasProxyClient(base_url=self.fas_url,
                               useragent=self.user_agent,
                               insecure=self.insecure)