File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -57,15 +57,19 @@ class IAMSigner {
5757 /// [serviceAccountEmail] is the optional service account email to use for
5858 /// signing. If not provided, it will be fetched from the GCE metadata server.
5959 ///
60- /// [endpoint] specifies the IAM Credentials API endpoint.
61- /// Defaults to `https://iamcredentials.googleapis.com` .
60+ /// [universeDomain] specifies the universe domain for constructing the IAM
61+ /// endpoint. Defaults to [defaultUniverseDomain] (googleapis.com).
62+ ///
63+ /// [endpoint] specifies a custom IAM Credentials API endpoint URL.
64+ /// If provided, takes precedence over [universeDomain] .
6265 IAMSigner (
6366 http.Client client, {
6467 String ? serviceAccountEmail,
65- String endpoint = 'https://iamcredentials.$defaultUniverseDomain ' ,
68+ String ? endpoint,
69+ String universeDomain = defaultUniverseDomain,
6670 }) : _client = client,
6771 _serviceAccountEmail = serviceAccountEmail,
68- _endpoint = endpoint;
72+ _endpoint = endpoint ?? 'https://iamcredentials.$ universeDomain ' ;
6973
7074 /// Returns the service account email.
7175 ///
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ class ImpersonatedAuthClient extends AutoRefreshDelegatingClient {
128128 null ,
129129 targetScopes,
130130 ),
131- super (sourceClient as http. Client , closeUnderlyingClient: false );
131+ super (sourceClient, closeUnderlyingClient: false );
132132
133133 /// The email of the target service account being impersonated.
134134 String get targetServiceAccount => _targetServiceAccount;
@@ -201,7 +201,7 @@ class ImpersonatedAuthClient extends AutoRefreshDelegatingClient {
201201 final signer = IAMSigner (
202202 _sourceClient,
203203 serviceAccountEmail: _targetServiceAccount,
204- endpoint : _universeDomain,
204+ universeDomain : _universeDomain,
205205 );
206206 return signer.sign (data);
207207 }
You can’t perform that action at this time.
0 commit comments