func (i *ServerInterceptor) UnaryInterceptor(ctx context.Context,
	req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (
	resp interface{}, err error) {
	token, err := tokenFromContext(ctx)
	if err != nil {
		log.Debugf("No token extracted, error was: %v", err)
		return handler(ctx, req)
	}
	idCtx := AddToContext(ctx, KeyTokenID, *token)
	return handler(idCtx, req)
}
UnaryInterceptor is an unary gRPC server interceptor that inspects incoming
calls for authentication tokens. If an LSAT authentication token is found in
the request, its token ID is extracted and treated as client ID. The
extracted ID is then attached to the request context in a format that is easy
to extract by request handlers.
package lsat
import (
	"bytes"
	"context"
	"fmt"
	"net/http"
	"google.golang.org/grpc"
	"google.golang.org/grpc/metadata"
)
type ServerInterceptor struct{}