feat: encrypt auth config

This commit is contained in:
Shivam Mishra
2026-04-06 19:52:16 +05:30
parent 118270d2e8
commit 3514ed61d6
3 changed files with 19 additions and 3 deletions
+4 -1
View File
@@ -3,7 +3,7 @@
# Table name: captain_custom_tools
#
# id :bigint not null, primary key
# auth_config :jsonb
# auth_config :text
# auth_type :string default("none")
# description :text
# enabled :boolean default(TRUE), not null
@@ -31,6 +31,9 @@ class Captain::CustomTool < ApplicationRecord
include Concerns::Toolable
include Concerns::SafeEndpointValidatable
serialize :auth_config, coder: JSON
encrypts :auth_config if Chatwoot.encryption_configured?
self.table_name = 'captain_custom_tools'
NAME_PREFIX = 'custom'.freeze