You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to send a twirp RPC call, in my use case, I need to get an authentication token via asynchronous method first. It seems to me that this cannot be done with the current implementation.
Desired code, most of which taken from official interceptor example in documentation:
// This does not compile
tart.InterceptorLogInterceptor(Logger l) {
return (Method next) {
return (Context ctx, dynamic req) async {
// added this line bellowString token =awaitgetAuthenticationToken();
l.print('''Service: ${ctx.value(tart.ContextKeys.serviceName)}, Method: ${ctx.value(tart.ContextKeys.methodName)}''');
returnnext(ctx, req);
};
};
}
The text was updated successfully, but these errors were encountered:
birdthedeveloper
changed the title
Allow asynchronous functions in a interceptor
Allow asynchronous functions in an interceptor
Sep 28, 2024
In order to send a twirp RPC call, in my use case, I need to get an authentication token via asynchronous method first. It seems to me that this cannot be done with the current implementation.
Desired code, most of which taken from official interceptor example in documentation:
The text was updated successfully, but these errors were encountered: