summaryrefslogtreecommitdiffstats
path: root/keystone/auth
diff options
context:
space:
mode:
authorDolph Mathews <dolph.mathews@gmail.com>2013-05-24 11:36:44 -0500
committerDolph Mathews <dolph.mathews@gmail.com>2013-05-24 13:29:58 -0500
commitaf4e96986f6ee45e9e4ccac0b143902362a1a676 (patch)
tree0252ac8e716b8823bd9cb09e0014e5c36683a8ae /keystone/auth
parentb85dec3175c85cc64c4dd1661e6399a6ec706d21 (diff)
downloadkeystone-af4e96986f6ee45e9e4ccac0b143902362a1a676.tar.gz
keystone-af4e96986f6ee45e9e4ccac0b143902362a1a676.tar.xz
keystone-af4e96986f6ee45e9e4ccac0b143902362a1a676.zip
Cleanup docstrings (flake8 H401, H402, H403, H404)
- docstring should not start with a space (flake8 H401) - one line docstring needs punctuation (flake8 H402) - multi line docstring end on new line (flake8 H403) - multi line docstring should start with a summary (flake8 H404) Change-Id: I69b414395930bda739aa01b785ac619fa8bb7d9b
Diffstat (limited to 'keystone/auth')
-rw-r--r--keystone/auth/controllers.py18
-rw-r--r--keystone/auth/plugins/password.py2
-rw-r--r--keystone/auth/token_factory.py4
3 files changed, 12 insertions, 12 deletions
diff --git a/keystone/auth/controllers.py b/keystone/auth/controllers.py
index 9d4db929..938b9cf6 100644
--- a/keystone/auth/controllers.py
+++ b/keystone/auth/controllers.py
@@ -51,7 +51,7 @@ def get_auth_method(method_name):
class AuthInfo(object):
- """ Encapsulation of "auth" request. """
+ """Encapsulation of "auth" request."""
def __init__(self, context, auth=None):
self.identity_api = identity.Manager()
@@ -166,7 +166,7 @@ class AuthInfo(object):
return user_ref
def _validate_and_normalize_scope_data(self):
- """ Validate and normalize scope data """
+ """Validate and normalize scope data."""
if 'scope' not in self.auth:
return
if sum(['project' in self.auth['scope'],
@@ -213,7 +213,7 @@ class AuthInfo(object):
raise exception.AuthMethodNotSupported()
def _validate_and_normalize_auth_data(self):
- """ Make sure "auth" is valid. """
+ """Make sure "auth" is valid."""
# make sure "auth" exist
if not self.auth:
raise exception.ValidationError(attribute='auth',
@@ -223,7 +223,7 @@ class AuthInfo(object):
self._validate_and_normalize_scope_data()
def get_method_names(self):
- """ Returns the identity method names.
+ """Returns the identity method names.
:returns: list of auth method names
@@ -231,7 +231,7 @@ class AuthInfo(object):
return self.auth['identity']['methods']
def get_method_data(self, method):
- """ Get the auth method payload.
+ """Get the auth method payload.
:returns: auth method payload
@@ -242,7 +242,7 @@ class AuthInfo(object):
return self.auth['identity'][method]
def get_scope(self):
- """ Get scope information.
+ """Get scope information.
Verify and return the scoping information.
@@ -260,7 +260,7 @@ class AuthInfo(object):
return self._scope_data
def set_scope(self, domain_id=None, project_id=None, trust=None):
- """ Set scope information. """
+ """Set scope information."""
if domain_id and project_id:
msg = _('Scoping to both domain and project is not allowed')
raise ValueError(msg)
@@ -280,7 +280,7 @@ class Auth(controller.V3Controller):
config.setup_authentication()
def authenticate_for_token(self, context, auth=None):
- """ Authenticate user and issue a token. """
+ """Authenticate user and issue a token."""
try:
auth_info = AuthInfo(context, auth=auth)
auth_context = {'extras': {}, 'method_names': []}
@@ -334,7 +334,7 @@ class Auth(controller.V3Controller):
raise exception.Unauthorized(msg)
def authenticate(self, context, auth_info, auth_context):
- """ Authenticate user. """
+ """Authenticate user."""
# user have been authenticated externally
if 'REMOTE_USER' in context:
diff --git a/keystone/auth/plugins/password.py b/keystone/auth/plugins/password.py
index ad263f77..68d9623a 100644
--- a/keystone/auth/plugins/password.py
+++ b/keystone/auth/plugins/password.py
@@ -103,7 +103,7 @@ class UserAuthInfo(object):
class Password(auth.AuthMethodHandler):
def authenticate(self, context, auth_payload, user_context):
- """ Try to authenticate against the identity backend. """
+ """Try to authenticate against the identity backend."""
user_info = UserAuthInfo(context, auth_payload)
# FIXME(gyee): identity.authenticate() can use some refactoring since
diff --git a/keystone/auth/token_factory.py b/keystone/auth/token_factory.py
index e6bf61b4..43a23ce6 100644
--- a/keystone/auth/token_factory.py
+++ b/keystone/auth/token_factory.py
@@ -219,7 +219,7 @@ class TokenDataHelper(object):
def recreate_token_data(context, token_data=None, expires=None,
user_ref=None, project_ref=None):
- """ Recreate token from an existing token.
+ """Recreate token from an existing token.
Repopulate the ephemeral data and return the new token data.
@@ -351,7 +351,7 @@ def create_token(context, auth_context, auth_info):
def render_token_data_response(token_id, token_data, created=False):
- """ Render token data HTTP response.
+ """Render token data HTTP response.
Stash token ID into the X-Auth-Token header.