I am trying to use the SDK to build bots with a different approach to server. I do not want the application to manage the server, but rather the application to be managed within a server.
The difference is - in the SDK, the recommended approach is to start server along with the bot itself. In my approach, I create an endpoint and a controller and run the application's messageHandlers (JwtMiddleware + onRequest).
My approach assumed that the HttpPlugin could be reconstructed without any Express server elements. It is based on the docs: https://microsoft.github.io/teams-sdk/typescript/migrations/v1 that state that in case the user needs to use a different server, they have to create their own custom HttpPlugin.
Unfortunately - as withJwtValidation is not exported, I cannot reconstruct onInit.
|
const jwtMiddleware = withJwtValidation({ |
What is the recommended way of attaching the JWT Validation Middleware then? Shouldn't the withJwtValidation function be exported for such cases?
I am trying to use the SDK to build bots with a different approach to server. I do not want the application to manage the server, but rather the application to be managed within a server.
The difference is - in the SDK, the recommended approach is to start server along with the bot itself. In my approach, I create an endpoint and a controller and run the application's messageHandlers (JwtMiddleware + onRequest).
My approach assumed that the HttpPlugin could be reconstructed without any Express server elements. It is based on the docs: https://microsoft.github.io/teams-sdk/typescript/migrations/v1 that state that in case the user needs to use a different server, they have to create their own custom HttpPlugin.
Unfortunately - as withJwtValidation is not exported, I cannot reconstruct onInit.
teams.ts/packages/apps/src/plugins/http/plugin.ts
Line 120 in ee110ba
What is the recommended way of attaching the JWT Validation Middleware then? Shouldn't the withJwtValidation function be exported for such cases?