Refactor: Rename auth controller to token controller
- All other controllers are named after the entity they manage. This makes it easier to understand what this controller does. Change-Id: Icc940f181fd91e340e7a10dfe1849a43180ea565
This commit is contained in:
parent
8788fc2551
commit
b5b28e0591
@ -1,3 +1,29 @@
|
|||||||
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
#
|
||||||
|
# Copyright (c) 2010-2011 OpenStack, LLC.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
Token Controller
|
||||||
|
|
||||||
|
This module contains the TokenController class which receives token-related
|
||||||
|
calls from the request routers.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
from keystone import utils
|
from keystone import utils
|
||||||
from keystone.common import wsgi
|
from keystone.common import wsgi
|
||||||
from keystone.logic.types import auth
|
from keystone.logic.types import auth
|
||||||
@ -6,7 +32,7 @@ import keystone.config as config
|
|||||||
from . import get_marker_limit_and_url
|
from . import get_marker_limit_and_url
|
||||||
|
|
||||||
|
|
||||||
class AuthController(wsgi.Controller):
|
class TokenController(wsgi.Controller):
|
||||||
"""Controller for token related operations"""
|
"""Controller for token related operations"""
|
||||||
|
|
||||||
def __init__(self, options):
|
def __init__(self, options):
|
@ -19,7 +19,7 @@ import routes
|
|||||||
|
|
||||||
from keystone.common import wsgi
|
from keystone.common import wsgi
|
||||||
import keystone.backends as db
|
import keystone.backends as db
|
||||||
from keystone.controllers.auth import AuthController
|
from keystone.controllers.token import TokenController
|
||||||
from keystone.controllers.roles import RolesController
|
from keystone.controllers.roles import RolesController
|
||||||
from keystone.controllers.staticfiles import StaticFilesController
|
from keystone.controllers.staticfiles import StaticFilesController
|
||||||
from keystone.controllers.tenant import TenantController
|
from keystone.controllers.tenant import TenantController
|
||||||
@ -38,7 +38,7 @@ class AdminApi(wsgi.Router):
|
|||||||
db.configure_backends(options)
|
db.configure_backends(options)
|
||||||
|
|
||||||
# Token Operations
|
# Token Operations
|
||||||
auth_controller = AuthController(options)
|
auth_controller = TokenController(options)
|
||||||
mapper.connect("/tokens", controller=auth_controller,
|
mapper.connect("/tokens", controller=auth_controller,
|
||||||
action="authenticate",
|
action="authenticate",
|
||||||
conditions=dict(method=["POST"]))
|
conditions=dict(method=["POST"]))
|
||||||
|
@ -19,7 +19,7 @@ import routes
|
|||||||
|
|
||||||
from keystone.common import wsgi
|
from keystone.common import wsgi
|
||||||
import keystone.backends as db
|
import keystone.backends as db
|
||||||
from keystone.controllers.auth import AuthController
|
from keystone.controllers.token import TokenController
|
||||||
from keystone.controllers.tenant import TenantController
|
from keystone.controllers.tenant import TenantController
|
||||||
from keystone.controllers.version import VersionController
|
from keystone.controllers.version import VersionController
|
||||||
from keystone.controllers.staticfiles import StaticFilesController
|
from keystone.controllers.staticfiles import StaticFilesController
|
||||||
@ -36,7 +36,7 @@ class ServiceApi(wsgi.Router):
|
|||||||
db.configure_backends(options)
|
db.configure_backends(options)
|
||||||
|
|
||||||
# Token Operations
|
# Token Operations
|
||||||
auth_controller = AuthController(options)
|
auth_controller = TokenController(options)
|
||||||
mapper.connect("/tokens", controller=auth_controller,
|
mapper.connect("/tokens", controller=auth_controller,
|
||||||
action="authenticate",
|
action="authenticate",
|
||||||
conditions=dict(method=["POST"]))
|
conditions=dict(method=["POST"]))
|
||||||
|
Loading…
Reference in New Issue
Block a user