From 4bed1e5bc3eb66571da0732d5526191b6d13ac72 Mon Sep 17 00:00:00 2001 From: jose Date: Mon, 4 Nov 2024 16:03:27 -0500 Subject: [PATCH] Using model name in logs instead of user --- lib/devise_saml_authenticatable/model.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/devise_saml_authenticatable/model.rb b/lib/devise_saml_authenticatable/model.rb index 6ff599c..c9b11e9 100644 --- a/lib/devise_saml_authenticatable/model.rb +++ b/lib/devise_saml_authenticatable/model.rb @@ -50,7 +50,7 @@ def authenticate_with_saml(saml_response, relay_state) else Devise.saml_resource_validator_hook.call(resource, decorated_response, auth_value) end if !valid - logger.info("User(#{auth_value}) did not pass custom validation.") + logger.info("#{self.name}(#{auth_value}) did not pass custom validation.") return nil end end @@ -60,10 +60,10 @@ def authenticate_with_saml(saml_response, relay_state) end if resource.nil? if create_user - logger.info("Creating user(#{auth_value}).") + logger.info("Creating #{self.name.downcase}(#{auth_value}).") resource = new else - logger.info("User(#{auth_value}) not found. Not configured to create the user.") + logger.info("#{self.name}(#{auth_value}) not found. Not configured to create the #{self.name.downcase}.") return nil end end