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
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
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())
def on_enable(self): super(LoginManager, self).on_enable() self.fpc = FasProxyClient(base_url=self.fas_url, useragent=self.user_agent, insecure=self.insecure)