Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
auth_interceptor.go 439 B
package server

import (
	"context"

	log "github.com/sirupsen/logrus"
	"google.golang.org/grpc"
)

type AuthInterceptor struct {
}

func (auth AuthInterceptor) Unary() grpc.UnaryServerInterceptor {
	return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
		log.Info("Interceptor called")

		// TODO: Implement proper auth logic here

		return handler(ctx, req)
	}
}