Skip to content

Commit

Permalink
add tests for corner cases of missing credentials and enabled/disable…
Browse files Browse the repository at this point in the history
…d auth for 'or'/ 'and' scheme
  • Loading branch information
MaryamAdnan3 committed Nov 23, 2023
1 parent 1abbaff commit 4ed9f5e
Show file tree
Hide file tree
Showing 5 changed files with 342 additions and 27 deletions.
2 changes: 1 addition & 1 deletion packages/authentication-adapters/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@apimatic/authentication-adapters",
"author": "APIMatic Ltd.",
"version": "0.5.1",
"version": "0.5.2",
"license": "MIT",
"sideEffects": false,
"main": "lib/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ function findMatchingAuth<T extends string>(
) {
return securityRequirements.find(
(andRequirements) =>
Object.keys(andRequirements).every((key) => key in providerConfig) &&
Object.values(andRequirements).every((value) => value)
Object.keys(andRequirements).every(
(key) => key in providerConfig && providerConfig[key]
) && Object.values(andRequirements).every((value) => value)
);
}

Expand Down
Loading

0 comments on commit 4ed9f5e

Please sign in to comment.