Beispiel #1
0
    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)
Beispiel #2
0
    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)
Beispiel #3
0
    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)
Beispiel #4
0
    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)
Beispiel #5
0
    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
Beispiel #6
0
    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
Beispiel #7
0
 def test_configs(self):
     auth.strategy('keystone')._register_opts(self.cfg)
     self.assertIn('keystone_authtoken', self.cfg)
Beispiel #8
0
 def test_configs(self):
     auth.strategy('keystone')._register_opts(self.cfg)
     self.assertIn('keystone_authtoken', self.cfg)