Skip to content

ChainedTokenProvider

Tries each provider in order and answers the first token obtained, the way the official Azure SDKs’ DefaultAzureCredential chains workload identity, then the CLI, then further sources.

Falling through to the next provider is the designed behaviour here, not a degradation, so a provider’s failure is logged at debug rather than warning.

final class ChainedTokenProvider implements AzureTokenProvider

ImplementsAzureTokenProvider
SourceChainedTokenProvider.php

public function __construct(non-empty-list<AzureTokenProvider> $providers, LoggerInterface $logger = new NullLogger(…)): mixed

PSR-3, so a Quiote application can pass its own Quiote\Logging\Log::for(...) (it already implements the interface) without this package needing the framework as a dependency. Defaults to discarding everything.

ParameterTypeDescription
$providersnon-empty-list``<AzureTokenProvider>
$loggerLoggerInterfacePSR-3, so a Quiote application can pass its own Quiote\Logging\Log::for(...) (it already implements the interface) without this package needing the framework as a dependency. Defaults to discarding everything.

Returns mixed

MethodDescription
getToken(): string

public function getToken(): string

Returns string