NAME

Azure::SDK::AppConfiguration::ConnectionString - parse App Configuration connection strings

DESCRIPTION

Parses Endpoint, Id, and Secret, rejects ambiguous or unsafe endpoints, and redacts credential material. Plain HTTP is accepted only for Aspire's loopback emulator; Azure HTTPS connections expose a memoized HMAC policy.

CONSTRUCTOR

new

Constructs an instance from named endpoint, credential_id, and credential_secret parameters. The secret must be valid Base64. Prefer parse for normal connection-string input.

CLASS METHODS

parse

my $connection = Azure::SDK::AppConfiguration::ConnectionString->parse(
        $ENV{CONFIGURATION_CONNECTIONSTRING},
);

Parses semicolon-separated Endpoint, Id, and Secret fields. Field names are case-insensitive. Missing, duplicate, malformed, or oversized input throws. Remote endpoints require HTTPS; HTTP is accepted only for loopback emulators.

METHODS

endpoint

Returns the normalized endpoint without a trailing slash.

is_emulator

Returns true for a loopback HTTP endpoint.

signer

Returns a memoized Azure::SDK::AppConfiguration::Hmac policy for Azure HTTPS connections, or undef for an anonymous loopback emulator.

to_string

Returns a redacted representation. Credential ID and secret values are never included.

SEE ALSO

Azure::SDK::AppConfiguration, Azure::SDK::Core::SecretString