Skip to content

Conversation

@stevengum
Copy link
Member

@stevengum stevengum commented Apr 6, 2021

Part of #3533 work
#minor

Specific Changes

  • add BotFrameworkAuthentication, ConnectorFactory, UserTokenClient, UserTokenClientImpl
  • move Token-related interfaces from botframework-connector to botframework-schema
    • Aligns with pattern of having types available in botframework-schema without changing behavior
  • move InvokeResponse to botframework-schema
  • move BotFrameworkClient to botframework-connector
  • add botbuilder-stdlib dependency to botframework-connector
  • auto-fix lint errors in botframework-connector
  • changed activityEx.getConversationReference return type to ConversationReference
    • The returned object contains the seven members of ConversationReference, so changing from Partial<ConversationReference> to ConversationReference isn't a breaking change in implementation or semantics.

Testing

Added unit tests for tests UserTokenClient

Comment on lines 65 to 84
// TODO: Update docstring - this is a direct port from .NET
/**
* Authenticate Bot Framework Protocol request to Skills.
*
* @param authHeader The HTTP auth header in the skill request.
*/
authenticateChannelRequest(authHeader: string): Promise<ClaimsIdentity> {
Copy link
Member Author

Choose a reason for hiding this comment

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

authenticateChannelServiceRequest might have been more accurate, albeit tied to a concept from different layer; botbuilder-core/Microsoft.Bot.Builder and botbuilder/Microsoft.Bot.Builder.Integration.AspNet.Core

@stevengum stevengum marked this pull request as ready for review April 6, 2021 19:17
@stevengum stevengum requested a review from a team as a code owner April 6, 2021 19:17
@coveralls
Copy link

coveralls commented Apr 6, 2021

Pull Request Test Coverage Report for Build 801016899

  • 23 of 36 (63.89%) changed or added relevant lines in 9 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.03%) to 85.432%

Changes Missing Coverage Covered Lines Changed/Added Lines %
libraries/botframework-connector/src/auth/userTokenClient.ts 6 8 75.0%
libraries/botframework-connector/src/tokenApi/operations/userToken.ts 4 9 44.44%
libraries/botframework-connector/src/auth/botFrameworkAuthentication.ts 4 10 40.0%
Totals Coverage Status
Change from base Build 797779276: -0.03%
Covered Lines: 19218
Relevant Lines: 21395

💛 - Coveralls

@stevengum stevengum force-pushed the stgum/bfAuth branch 2 times, most recently from 1f4047f to 178d0e5 Compare April 15, 2021 23:56
* add UserTokenClient, ConnectorFactory, BotFrameworkAuthentication
* move InvokeResponse to schema
* move BotFrameworkClient to connector
* add stdlib to connector
* auto-fix lint errors in connector
* changed activityEx.getConversationReference return type
* address PR feedback
* revert changes to unused enterpriseChannelValidation.ts
@stevengum stevengum merged commit fe1ca29 into main Apr 30, 2021
@stevengum stevengum deleted the stgum/bfAuth branch April 30, 2021 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants