1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

Merge pull request #2223 from wenottingham/info-for-the-info-gods

Switch token/basic auth logging to INFO.
This commit is contained in:
Bill Nottingham 2018-06-19 12:29:24 -04:00 committed by GitHub
commit 3dd2b97a53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,7 @@ class LoggedBasicAuthentication(authentication.BasicAuthentication):
ret = super(LoggedBasicAuthentication, self).authenticate(request)
if ret:
username = ret[0].username if ret[0] else '<none>'
logger.debug(smart_text(u"User {} performed a {} to {} through the API".format(username, request.method, request.path)))
logger.info(smart_text(u"User {} performed a {} to {} through the API".format(username, request.method, request.path)))
return ret
def authenticate_header(self, request):
@ -50,7 +50,7 @@ class LoggedOAuth2Authentication(OAuth2Authentication):
if ret:
user, token = ret
username = user.username if user else '<none>'
logger.debug(smart_text(
logger.info(smart_text(
u"User {} performed a {} to {} through the API using OAuth token {}.".format(
username, request.method, request.path, token.pk
)