Don't return ``user_name`` in mapped.Mapped class.

auth.mapped.Mapped._handle_unscoped_token() and _setup_username don't
need to return and store variable ``user_name``. Drop it.

Change-Id: Id66e63a49a146a04217ad5c548cd877819aa9ca2
This commit is contained in:
Marek Denis 2014-11-12 19:25:04 +01:00
parent 85c6940d66
commit 22943da178
1 changed files with 2 additions and 3 deletions

View File

@ -107,8 +107,7 @@ class Mapped(auth.AuthMethodHandler):
mapped_properties = self._apply_mapping_filter(identity_provider,
protocol,
assertion)
user_name, user_id = self._setup_username(context,
mapped_properties)
user_id = self._setup_username(context, mapped_properties)
group_ids = mapped_properties['group_ids']
except Exception:
@ -175,4 +174,4 @@ class Mapped(auth.AuthMethodHandler):
if user_name is None:
raise exception.Unauthorized(_("Could not map user"))
user_id = parse.quote(user_name)
return user_name, user_id
return user_id