Skip to content

Commit

Permalink
Issue #228: Fix authorization in GRPC calls
Browse files Browse the repository at this point in the history
	--Reverted code commented during testing
  • Loading branch information
razorao committed Aug 17, 2021
1 parent 55850ee commit 710f92e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions service/web/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"golang.org/x/sync/errgroup"
"google.golang.org/grpc"

"github.com/razorpay/metro/internal/app"
"github.com/razorpay/metro/internal/brokerstore"
"github.com/razorpay/metro/internal/credentials"
"github.com/razorpay/metro/internal/health"
Expand Down Expand Up @@ -142,9 +143,9 @@ func (svc *Service) Start(ctx context.Context) error {

func getInterceptors() []grpc.UnaryServerInterceptor {
// skip auth from test mode executions
// if app.IsTestMode() {
// return []grpc.UnaryServerInterceptor{}
// }
if app.IsTestMode() {
return []grpc.UnaryServerInterceptor{}
}

return []grpc.UnaryServerInterceptor{
interceptors.UnaryServerAuthInterceptor(func(ctx context.Context) (context.Context, error) {
Expand Down

0 comments on commit 710f92e

Please sign in to comment.