Skip to content

[Identity] Throwing if required parameters are not provided#16846

Merged
6 commits merged intoAzure:mainfrom
sadasant:identity/required-parameters
Aug 20, 2021
Merged

[Identity] Throwing if required parameters are not provided#16846
6 commits merged intoAzure:mainfrom
sadasant:identity/required-parameters

Conversation

@sadasant
Copy link
Copy Markdown
Contributor

Since I moved most of the processing to a common place (nodeCommon.ts), some of the requirements per credential were obscured. ClientSecretCredential and ClientCertificateCredential in particular where not throwing early if the parameters weren’t provided (which of course is possible if users bypass the parameter types, or if they use JavaScript). I’ve also added tests to confirm this behavior in the future.

@sadasant sadasant self-assigned this Aug 10, 2021
@ghost ghost added the Azure.Identity label Aug 10, 2021
Copy link
Copy Markdown
Member

@KarishmaGhiya KarishmaGhiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think this will affect any related tests in tests for other credentials like DefaultAzureCred or ManagedIdentityCred - will you have to update the error messages in those tests too? @sadasant

@sadasant
Copy link
Copy Markdown
Contributor Author

@KarishmaGhiya I’ll check what other credentials are affected! Thank you!

@sadasant
Copy link
Copy Markdown
Contributor Author

@KarishmaGhiya DefaultAzureCred nor ManagedIdentityCredential are really affected, since they don’t have required parameters. I’ll keep it simple in this PR.

@ghost
Copy link
Copy Markdown

ghost commented Aug 10, 2021

Hello @sadasant!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@sadasant sadasant requested a review from maorleger as a code owner August 20, 2021 00:43
@ghost ghost merged commit 99343b4 into Azure:main Aug 20, 2021
@sadasant sadasant deleted the identity/required-parameters branch August 20, 2021 14:25
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-js that referenced this pull request Jan 5, 2022
Fix flipped order in Face generated models (Azure#16846)

* Fix flipped order in Face generated models

The recent change changing a nested parameter from optional to required
caused the AutoRest generated model to have a reversed order of two
string arguments. Expanding the nesting for affected models to avoid
breaking changes.

* Fix malformatted examples
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants