Module: CommandTower::CredentialResolution
- Defined in:
- lib/command_tower/credential_resolution.rb,
lib/command_tower/credential_resolution/env_backend.rb,
lib/command_tower/credential_resolution/smtp_credentials.rb,
lib/command_tower/credential_resolution/twilio_credentials.rb,
lib/command_tower/credential_resolution/smtp_action_mailer_bridge.rb
Overview
Provider-facing deployment credential normalization. Hosts supply via config.credentials.*, custom resolver, and/or ENV. Providers call resolve only — never branch on source.
Defined Under Namespace
Modules: EnvBackend, SmtpActionMailerBridge Classes: SmtpCredentials, TwilioCredentials
Constant Summary collapse
- PROVIDERS =
{ twilio: TwilioCredentials, smtp: SmtpCredentials, }.freeze
Class Method Summary collapse
Class Method Details
.resolve(provider) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/command_tower/credential_resolution.rb', line 20 def resolve(provider) key = normalize_provider!(provider) explicit = explicit_credentials(key) return explicit if explicit.available? custom = custom_resolver_credentials(key) return custom if custom&.available? env_credentials(key) end |