Alexander Kislitsky 5213a7d39a Keystone middleware added
For auth purposes keystone middleware is used.
Auth configuration added into example config.
Keystone auth is disabled in tests.

Change-Id: Id6e8da1529b35f66eb0192622f05662858b63b79
Closes-Bug: #1583106
2016-05-24 18:58:07 +03:00

22 lines
824 B
Python

# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from keystonemiddleware import auth_token
class KeystoneMiddleware(auth_token.AuthProtocol):
def __init__(self, app):
self.app = app.wsgi_app
auth_settings = app.config.get('AUTH')
super(KeystoneMiddleware, self).__init__(self.app, auth_settings)