Skip to content

Commit

Permalink
Merge pull request #258 from j-castellanos/jc/use-model-name-in-logs
Browse files Browse the repository at this point in the history
Using model name in logs instead of user
  • Loading branch information
adamstegman authored Nov 6, 2024
2 parents 960ddf6 + 4bed1e5 commit f873314
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/devise_saml_authenticatable/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit f873314

Please sign in to comment.