Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disambiguate debug messages of auth backends #254

Merged
merged 2 commits into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions django_auth_adfs/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ class AdfsAuthCodeBackend(AdfsBaseBackend):
def authenticate(self, request=None, authorization_code=None, **kwargs):
# If there's no token or code, we pass control to the next authentication backend
if authorization_code is None or authorization_code == '':
logger.debug("django_auth_adfs authentication backend was called but no authorization code was received")
logger.debug("Authentication backend was called but no authorization code was received")
return

# If loaded data is too old, reload it again
Expand All @@ -414,7 +414,7 @@ def authenticate(self, request=None, access_token=None, **kwargs):

# If there's no token or code, we pass control to the next authentication backend
if access_token is None or access_token == '':
logger.debug("django_auth_adfs authentication backend was called but no authorization code was received")
logger.debug("Authentication backend was called but no access token was received")
return

access_token = access_token.decode()
Expand Down
4 changes: 2 additions & 2 deletions django_auth_adfs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def load_config(self):
# If loaded data is too old, reload it again
refresh_time = datetime.now() - timedelta(hours=settings.CONFIG_RELOAD_INTERVAL)
if self._config_timestamp is None or self._config_timestamp < refresh_time:
logger.debug("Loading django_auth_adfs ID Provider configuration.")
logger.debug("Loading ID Provider configuration.")
try:
loaded = self._load_openid_config()
self._mode = "openid_connect"
Expand All @@ -224,7 +224,7 @@ def load_config(self):
logger.warning("Could not load any data from ADFS server. Keeping previous configurations")
self._config_timestamp = datetime.now()

logger.info("django_auth_adfs loaded settings from ADFS server.")
logger.info("Loaded settings from ADFS server.")
logger.info("operating mode: %s", self._mode)
logger.info("authorization endpoint: %s", self.authorization_endpoint)
logger.info("token endpoint: %s", self.token_endpoint)
Expand Down