Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: extend universe_domain support #1633

Merged
merged 6 commits into from
Aug 31, 2023
Merged

Conversation

danielbankhead
Copy link
Contributor

For context, this is how universe_domain is passed to the clients via JSON:

/**
* Create a credentials instance using the given input options.
* @param json The input object.
* @param options The JWT or UserRefresh options for the client
* @returns JWT or UserRefresh Client with data
*/
fromJSON(
json: JWTInput | ImpersonatedJWTInput,
options: RefreshOptions = {}
): JSONClient {
let client: JSONClient;
options = options || {};
if (json.type === USER_REFRESH_ACCOUNT_TYPE) {
client = new UserRefreshClient(options);
client.fromJSON(json);
} else if (json.type === IMPERSONATED_ACCOUNT_TYPE) {
client = this.fromImpersonatedJSON(json as ImpersonatedJWTInput);
} else if (json.type === EXTERNAL_ACCOUNT_TYPE) {
client = ExternalAccountClient.fromJSON(
json as ExternalAccountClientOptions,
options
)!;
client.scopes = this.getAnyScopes();
} else if (json.type === EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE) {
client = new ExternalAccountAuthorizedUserClient(
json as ExternalAccountAuthorizedUserClientOptions,
options
);
} else {
(options as JWTOptions).scopes = this.scopes;
client = new JWT(options);
this.setGapicJWTValues(client);
client.fromJSON(json);
}
return client;
}

🦕

@danielbankhead danielbankhead requested review from a team as code owners August 30, 2023 00:31
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Aug 30, 2023
@sofisl sofisl added the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 30, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 30, 2023
@danielbankhead danielbankhead merged commit 4ee02da into main Aug 31, 2023
16 checks passed
@danielbankhead danielbankhead deleted the tpc-universe-update branch August 31, 2023 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants