// DefaultInterceptor is default authN/authZ interceptor, validates only token correctness without performing any role specific authorization.
DefaultInterceptor is default authN/authZ interceptor, validates only token correctness without performing any role specific authorization.
// DefaultInterceptor is default authN / authZ interceptor validates only token correctness without performing any role specific authorization .
func (ad *SysAccountRepo) DefaultInterceptor(ctx context.Context) (context.Context, error) {
	methodName, ok := grpc.Method(ctx)
	if ok {
		ad.log.Infof("Method being called: %s", methodName)
	}
	for _, routes := range ad.unauthenticatedRoutes {
		if routes == methodName {
			return ctx, nil
		}
	}
	claims, err := ad.ObtainAccessClaimsFromMetadata(ctx, true)
	if err != nil {
		return nil, status.Errorf(codes.Unauthenticated, "Request unauthenticated with error: %v", err)
	}
	return context.WithValue(ctx, sharedAuth.ContextKeyClaims, claims), nil
}
func ( ad * SysAccountRepo ) DefaultInterceptor ( ctx context . Context ) ( context . Context , error ) { methodName , ok := grpc . Method ( ctx ) if ok { ad . log . Infof ( " " , methodName ) } for _ , routes := range ad . unauthenticatedRoutes { if routes == methodName { return ctx , nil } } claims , err := ad . ObtainAccessClaimsFromMetadata ( ctx , true ) if err != nil { return nil , status . Errorf ( codes . Unauthenticated , " " , err ) } return context . WithValue ( ctx , sharedAuth . ContextKeyClaims , claims ) , nil }
DefaultInterceptor is default authN/authZ interceptor, validates only token correctness without performing any role specific authorization.
DefaultInterceptor is default authN / authZ interceptor validates only token correctness without performing any role specific authorization .
// Simply returns the context if request are being made on unauthenticated service path / method.