Skip to content

Commit 8decf5b

Browse files
[identity] Re-export WorkloadIdentityCredential options (Azure#25155)
### Packages impacted by this PR - [@azure/identity] ### Issues associated with this PR ### Describe the problem that is addressed by this PR Customer reported issue with non-exported `WorkloadIdentityDefaultCredentialOptions` ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [x] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [x] Added a changelog (if necessary) --------- Co-authored-by: Karishma Ghiya <[email protected]>
1 parent f8e8362 commit 8decf5b

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

sdk/identity/identity/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
### Bugs Fixed
1010

1111
- Fixed a bug in `WorkloadIdentity Credential`, to incorporate the case where the options can be `undefined` in a conditional check. Related issue [#25089](https://github.com/Azure/azure-sdk-for-js/issues/25089) with the fix [#25119](https://github.com/Azure/azure-sdk-for-js/pull/25119).
12+
- Exported `WorkloadIdentityDefaultCredentialOptions` which was previously not publicly exported in `index.ts`.
13+
1214
### Other Changes
1315

1416
## 3.2.0-beta.1 (2023-02-28)

sdk/identity/identity/review/identity.api.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,6 @@ export interface VisualStudioCodeCredentialOptions extends MultiTenantTokenCrede
380380
// @public
381381
export class WorkloadIdentityCredential implements TokenCredential {
382382
constructor(options: WorkloadIdentityCredentialOptions);
383-
// Warning: (ae-forgotten-export) The symbol "WorkloadIdentityDefaultCredentialOptions" needs to be exported by the entry point index.d.ts
384-
//
385383
// @internal
386384
constructor(options?: WorkloadIdentityDefaultCredentialOptions);
387385
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken | null>;
@@ -394,6 +392,10 @@ export interface WorkloadIdentityCredentialOptions extends WorkloadIdentityDefau
394392
tenantId: string;
395393
}
396394

395+
// @public
396+
export interface WorkloadIdentityDefaultCredentialOptions extends MultiTenantTokenCredentialOptions, AuthorityValidationOptions {
397+
}
398+
397399
// (No @packageDocumentation comment for this package)
398400

399401
```

sdk/identity/identity/src/credentials/workloadIdentityCredentialOptions.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import { AuthorityValidationOptions } from "./authorityValidationOptions";
55
import { MultiTenantTokenCredentialOptions } from "./multiTenantTokenCredentialOptions";
6-
import { WorkloadIdentityCredential } from "./workloadIdentityCredential";
76

87
/**
98
* Options for the {@link WorkloadIdentityCredential}
@@ -25,8 +24,7 @@ export interface WorkloadIdentityCredentialOptions
2524
}
2625

2726
/**
28-
* @internal
29-
* @hidden
27+
* Internal Options for the {@link WorkloadIdentityCredential}, not meant to be used directly.
3028
*/
3129
export interface WorkloadIdentityDefaultCredentialOptions
3230
extends MultiTenantTokenCredentialOptions,

sdk/identity/identity/src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ export { VisualStudioCodeCredential } from "./credentials/visualStudioCodeCreden
9090
export { VisualStudioCodeCredentialOptions } from "./credentials/visualStudioCodeCredentialOptions";
9191
export { OnBehalfOfCredential } from "./credentials/onBehalfOfCredential";
9292
export { WorkloadIdentityCredential } from "./credentials/workloadIdentityCredential";
93-
export { WorkloadIdentityCredentialOptions } from "./credentials/workloadIdentityCredentialOptions";
93+
export {
94+
WorkloadIdentityCredentialOptions,
95+
WorkloadIdentityDefaultCredentialOptions,
96+
} from "./credentials/workloadIdentityCredentialOptions";
9497

9598
export { TokenCachePersistenceOptions } from "./msal/nodeFlows/tokenCachePersistenceOptions";
9699

0 commit comments

Comments
 (0)