func grpcAuth(ctx context.Context) (context.Context, error) {

	token, err := grpc_auth.AuthFromMD(ctx, "Bearer")
	if err != nil {
		return nil, err
	}

	tokenInfo, err := parseToken(token)
	if err != nil {
		return nil, status.Errorf(codes.Unauthenticated, "invalid auth token: %v", err)
	}

	// do we need this at all?
	newCtx := context.WithValue(ctx, contextKeyTokenInfoID, tokenInfo)

	return newCtx, nil
}
//grpcAuth is a middleware (interceptor) that extracts and verifies token from header
grpcAuth is a middleware (interceptor) that extracts and verifies token from header
// grpcAuth is a middleware ( interceptor ) that extracts and verifies token from header
func grpcAuth(ctx context.Context) (context.Context, error) {
	token, err := grpc_auth.AuthFromMD(ctx, "Bearer")
	if err != nil {
		return nil, err
	}
	tokenInfo, err := parseToken(token)
	if err != nil {
		return nil, status.Errorf(codes.Unauthenticated, "invalid auth token: %v", err)
	}
	newCtx := context.WithValue(ctx, contextKeyTokenInfoID, tokenInfo)
	return newCtx, nil
}
func grpcAuth ( ctx context . Context ) ( context . Context , error ) { token , err := grpc_auth . AuthFromMD ( ctx , " " ) if err != nil { return nil , err } tokenInfo , err := parseToken ( token ) if err != nil { return nil , status . Errorf ( codes . Unauthenticated , " " , err ) } newCtx := context . WithValue ( ctx , contextKeyTokenInfoID , tokenInfo ) return newCtx , nil }
grpcAuth is a middleware (interceptor) that extracts and verifies token from header
grpcAuth is a middleware ( interceptor ) that extracts and verifies token from header
// do we need this at all?