To ensure that the token exchange response is properly overridden, we need to use a callback instead of emitting an event as we can’t guarantee that the event gets emitted in-order before we return the response from the API. Especially if the user wants to implement any async code.
Usage
Now, when configuring your server binding, exchangeMailboxTokenCallback is a required field and takes a reference to a function that accepts two parameters; accessToken: AccessToken, res: ServerResponse. Currently, ServerResponse is just Express.Response but it will be expanded to include the response object of other frameworks.
I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.
Description
To ensure that the token exchange response is properly overridden, we need to use a callback instead of emitting an event as we can’t guarantee that the event gets emitted in-order before we return the response from the API. Especially if the user wants to implement any async code.
Usage
Now, when configuring your server binding,
exchangeMailboxTokenCallback
is a required field and takes a reference to a function that accepts two parameters;accessToken: AccessToken, res: ServerResponse
. Currently,ServerResponse
is justExpress.Response
but it will be expanded to include the response object of other frameworks.License
I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.