Module: PG::AzureWorkloadIdentity
- Includes:
- ActiveRecordPostgreSQLAdapter, Connection
- Defined in:
- lib/pg/azure_workload_identity.rb,
lib/pg/azure_workload_identity/error.rb,
lib/pg/azure_workload_identity/version.rb,
lib/pg/azure_workload_identity/auth_token.rb,
lib/pg/azure_workload_identity/connection.rb,
lib/pg/azure_workload_identity/connection_info.rb,
lib/pg/azure_workload_identity/auth_token_injector.rb,
lib/pg/azure_workload_identity/connection_info/uri.rb,
lib/pg/azure_workload_identity/auth_token_generator.rb,
lib/pg/azure_workload_identity/active_record_postgresql_adapter.rb,
lib/pg/azure_workload_identity/connection_info/key_value_string.rb,
lib/pg/azure_workload_identity/active_record_postgresql_database_tasks.rb,
lib/pg/azure_workload_identity/connection_info/active_record_configuration_hash.rb
Overview
Namespace for the pg-azure_workload_identity gem, which provides Azure Workload Identity authentication support for the pg gem and related tools.
Defined Under Namespace
Modules: ActiveRecordPostgreSQLAdapter, ActiveRecordPostgreSQLDatabaseTasks, Connection, ConnectionInfo Classes: AuthToken, AuthTokenGenerator, AuthTokenInjector, Error
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
-
.auth_token_generator ⇒ AuthTokenGenerator
Returns the process-wide AuthTokenGenerator, lazily instantiated on first access via AuthTokenGenerator.default so that env-loading libraries (e.g. dotenv) have a chance to populate
ENVbefore the generator captures its configuration. -
.auth_token_generator=(generator) ⇒ #call
Overrides the process-wide AuthTokenGenerator.
Methods included from Connection
#conndefaults, #conninfo_parse, #parse_connect_args
Methods included from ActiveRecordPostgreSQLAdapter
Class Method Details
.auth_token_generator ⇒ AuthTokenGenerator
Returns the process-wide AuthTokenGenerator, lazily instantiated on
first access via PG::AzureWorkloadIdentity::AuthTokenGenerator.default so that env-loading
libraries (e.g. dotenv) have a chance to populate ENV before the
generator captures its configuration.
18 19 20 |
# File 'lib/pg/azure_workload_identity.rb', line 18 def self.auth_token_generator @auth_token_generator ||= AuthTokenGenerator.default end |
.auth_token_generator=(generator) ⇒ #call
Overrides the process-wide AuthTokenGenerator. Mainly useful for tests or for callers that want to provide a custom-configured generator instead of the env-driven default.
28 29 30 |
# File 'lib/pg/azure_workload_identity.rb', line 28 def self.auth_token_generator=(generator) @auth_token_generator = generator end |