public class ServerAuthInterceptor implements ServerInterceptor {
@Override
public <ReqT, RespT> Listener<ReqT> interceptCall(ServerCall<ReqT, RespT> call, Metadata headers,
ServerCallHandler<ReqT, RespT> next) {
if (!MyThing.isValid(headers)) {
call.close(Status.PERMISSION_DENIED, new Metadata());
// TODO: what do we return here to avoid the exception caused by startCall below?
}
return next.startCall(call, headers);
}
}
--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/096d69d5-f859-4183-8e5e-245fa78fc20e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.