mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
Switch token/basic auth logging to INFO, to match login/logout logging.
This commit is contained in:
@@ -25,7 +25,7 @@ class LoggedBasicAuthentication(authentication.BasicAuthentication):
|
|||||||
ret = super(LoggedBasicAuthentication, self).authenticate(request)
|
ret = super(LoggedBasicAuthentication, self).authenticate(request)
|
||||||
if ret:
|
if ret:
|
||||||
username = ret[0].username if ret[0] else '<none>'
|
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
|
return ret
|
||||||
|
|
||||||
def authenticate_header(self, request):
|
def authenticate_header(self, request):
|
||||||
@@ -50,7 +50,7 @@ class LoggedOAuth2Authentication(OAuth2Authentication):
|
|||||||
if ret:
|
if ret:
|
||||||
user, token = ret
|
user, token = ret
|
||||||
username = user.username if user else '<none>'
|
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(
|
u"User {} performed a {} to {} through the API using OAuth token {}.".format(
|
||||||
username, request.method, request.path, token.pk
|
username, request.method, request.path, token.pk
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user