Reduce log noise on expired tokens
If a token has expired, we now check the username field exists before trying to len() it, thus reducing log noise. Change-Id: Ie463607e4fb7ca671f9dad5559b87fe7721be4bd Closes-Bug: #1319997
This commit is contained in:
parent
3ca5ce4377
commit
0ba5334811
@ -253,11 +253,11 @@ class Auth(controller.V2Controller):
|
|||||||
size=CONF.max_param_size)
|
size=CONF.max_param_size)
|
||||||
|
|
||||||
username = auth['passwordCredentials'].get('username', '')
|
username = auth['passwordCredentials'].get('username', '')
|
||||||
|
|
||||||
|
if username:
|
||||||
if len(username) > CONF.max_param_size:
|
if len(username) > CONF.max_param_size:
|
||||||
raise exception.ValidationSizeError(attribute='username',
|
raise exception.ValidationSizeError(attribute='username',
|
||||||
size=CONF.max_param_size)
|
size=CONF.max_param_size)
|
||||||
|
|
||||||
if username:
|
|
||||||
try:
|
try:
|
||||||
user_ref = self.identity_api.get_user_by_name(
|
user_ref = self.identity_api.get_user_by_name(
|
||||||
username, CONF.identity.default_domain_id)
|
username, CONF.identity.default_domain_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user