예제 #1
0
파일: driver.py 프로젝트: rose/zaqar
    def _init_middleware(self):
        """Initialize WSGI middlewarez."""

        # NOTE(flaper87): Install Auth
        if self._conf.auth_strategy:
            strategy = auth.strategy(self._conf.auth_strategy)
            self.app = strategy.install(self.app, self._conf)
예제 #2
0
파일: driver.py 프로젝트: rodis/zaqar
    def _init_middleware(self):
        """Initialize WSGI middlewarez."""

        # NOTE(flaper87): Install Auth
        if self._conf.auth_strategy:
            strategy = auth.strategy(self._conf.auth_strategy)
            self.app = strategy.install(self.app, self._conf)
예제 #3
0
파일: driver.py 프로젝트: pombredanne/zaqar
    def _init_middleware(self):
        """Initialize WSGI middlewarez."""

        auth_app = self.app

        # NOTE(flaper87): Install Auth
        if self._conf.auth_strategy:
            strategy = auth.strategy(self._conf.auth_strategy)
            auth_app = strategy.install(self.app, self._conf)

        self.app = auth.SignedHeadersAuth(self.app, auth_app)

        acl.setup_policy(self._conf)
예제 #4
0
파일: driver.py 프로젝트: pombredanne/zaqar
    def _init_middleware(self):
        """Initialize WSGI middlewarez."""

        auth_app = self.app

        # NOTE(flaper87): Install Auth
        if self._conf.auth_strategy:
            strategy = auth.strategy(self._conf.auth_strategy)
            auth_app = strategy.install(self.app, self._conf)

        self.app = auth.SignedHeadersAuth(self.app, auth_app)

        acl.setup_policy(self._conf)
예제 #5
0
파일: driver.py 프로젝트: wenchma/zaqar
    def __init__(self, conf, api, cache):
        super(Driver, self).__init__(conf, None, None, None)
        self._api = api
        self._cache = cache

        self._conf.register_opts(_WS_OPTIONS, group=_WS_GROUP)
        self._ws_conf = self._conf[_WS_GROUP]

        if self._conf.auth_strategy:
            auth_strategy = auth.strategy(self._conf.auth_strategy)
            self._auth_strategy = lambda app: auth_strategy.install(
                app, self._conf)
        else:
            self._auth_strategy = None
예제 #6
0
파일: driver.py 프로젝트: wenchma/zaqar
    def __init__(self, conf, api, cache):
        super(Driver, self).__init__(conf, None, None, None)
        self._api = api
        self._cache = cache

        self._conf.register_opts(_WS_OPTIONS, group=_WS_GROUP)
        self._ws_conf = self._conf[_WS_GROUP]

        if self._conf.auth_strategy:
            auth_strategy = auth.strategy(self._conf.auth_strategy)
            self._auth_strategy = lambda app: auth_strategy.install(
                app, self._conf)
        else:
            self._auth_strategy = None
예제 #7
0
파일: test_auth.py 프로젝트: wenchma/zaqar
 def test_configs(self):
     auth.strategy('keystone')._register_opts(self.cfg)
     self.assertIn('keystone_authtoken', self.cfg)
예제 #8
0
파일: test_auth.py 프로젝트: rose/zaqar
 def test_configs(self):
     auth.strategy('keystone')._register_opts(self.cfg)
     self.assertIn('keystone_authtoken', self.cfg)