auth: improve logging for auth methods.
This commit is contained in:
parent
0b609b34b8
commit
6d2a154667
1 changed files with 3 additions and 3 deletions
|
|
@ -853,17 +853,17 @@ class AuthUser(object):
|
|||
|
||||
# lookup by userid
|
||||
if self.user_id is not None and self.user_id != anon_user.user_id:
|
||||
log.debug('Trying Auth User lookup by USER ID %s' % self.user_id)
|
||||
log.debug('Trying Auth User lookup by USER ID: `%s`' % self.user_id)
|
||||
is_user_loaded = user_model.fill_data(self, user_id=self.user_id)
|
||||
|
||||
# try go get user by api key
|
||||
elif self._api_key and self._api_key != anon_user.api_key:
|
||||
log.debug('Trying Auth User lookup by API KEY %s' % self._api_key)
|
||||
log.debug('Trying Auth User lookup by API KEY: `%s`' % self._api_key)
|
||||
is_user_loaded = user_model.fill_data(self, api_key=self._api_key)
|
||||
|
||||
# lookup by username
|
||||
elif self.username:
|
||||
log.debug('Trying Auth User lookup by USER NAME %s' % self.username)
|
||||
log.debug('Trying Auth User lookup by USER NAME: `%s`' % self.username)
|
||||
is_user_loaded = user_model.fill_data(self, username=self.username)
|
||||
else:
|
||||
log.debug('No data in %s that could been used to log in' % self)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue