-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move Error logic out of botbuilder into authentication layer #1985
Conversation
…erviceHandler.test.js because the unit tests are obscuring the correct expected result from botFrameworkAdapterStreaming.test.js
…commented back in commented out unit tests
…asses tests; MockNetSocket now has createResponseFromError; JwtTokenValidation throws AuthenticationError instead of Error
…age; keep steven's conditional logic as fallback, in case we catch a non-StatusCodeError
…tivate in authenticateConnection() call
…builder-js into Zerryth/authErrors
libraries/botframework-connector/src/auth/authenticationError.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, chrome tests are breaking in the build, and I don't believe it has anything to do with the PR changes...reached out to Bruce regarding that aspect. (UPDATE: seems like browser test breaks are a known issue, with Steven on getting the fix) Thanks @Stevenic for reviewing! (Woohoo a PR review finally 😄) |
libraries/botframework-connector/src/auth/endorsementsValidator.ts
Outdated
Show resolved
Hide resolved
libraries/botframework-connector/src/auth/authenticationError.ts
Outdated
Show resolved
Hide resolved
libraries/botframework-connector/src/auth/authenticationError.ts
Outdated
Show resolved
Hide resolved
libraries/botframework-connector/src/auth/authenticationError.ts
Outdated
Show resolved
Hide resolved
LMK if anything else is needed 😀 |
…builder-js into Zerryth/authErrors
Fixes #1445
Description
See discussion in comment.
Specific Changes
IStatusCodeError
in botbuilder-schema.StatusCodeError
class built in botbuilder, however we can't use it in the auth layers in botframework-connectorAuthenticationError
class (ctor needs status code and message) in botframework-connectorBotFrameworkAdapter.authenticateConnection()
is called now throw this custom error, so we rely less heavily on string-parsing to determine status code to throw. (Throwing errors w/status code already done in other parts of SDK as well):.JwtTokenValidation
ChannelValidation
,EmulatorValidation
,GovernmentChannelValidation
,SkillValidation
JwtTokenExtractor
EndorsementsValidation
jsonwebtoken
that handles validating tokens with Channel Service's asymmetical signatures)