southworks / botbuilder-js

JavaScript SDK used to build chat bots for the Microsoft Bot Framework.
MIT License
1 stars 3 forks source link

port: [#4632] Support Federated Identity Credential #480

Closed sw-joelmut closed 1 month ago

sw-joelmut commented 1 month ago

Fixes # 4632

minor

Ported from https://github.com/microsoft/botbuilder-dotnet/pull/ 6838

Description

This PR ports the Federated Credentials from DotNet's repo. The implementation is similar except in the fetchExternalToken, since it requires the Audience value to be provided, by default it uses 'api://AzureADTokenExchange'.

Specific Changes

Bot usage example image

Testing

As we FIC isn't available for third-party apps, we encountered the following error (same error when testing DotNet's implementation). image

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 11182131237

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
libraries/botframework-connector/src/auth/federatedAppCredentials.ts 5 15 33.33%
libraries/botframework-connector/src/auth/federatedServiceClientCredentialsFactory.ts 4 15 26.67%
<!-- Total: 12 33 36.36% -->
Totals Coverage Status
Change from base Build 11168214507: -0.1%
Covered Lines: 20444
Relevant Lines: 22942

💛 - Coveralls
sw-joelmut commented 1 month ago

/promoted 4765