From 579143ab05e862c7f0878d0b557eb55b6f53608a Mon Sep 17 00:00:00 2001
From: Benjamin Wenger <ben@elixxir.ioo>
Date: Thu, 7 Apr 2022 09:32:11 -0700
Subject: [PATCH] work in auth

---
 auth/params.go  | 14 ++++++++++++++
 auth/request.go |  2 +-
 auth/state.go   |  9 ++++++++-
 3 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/auth/params.go b/auth/params.go
index 01078076b..abc251e64 100644
--- a/auth/params.go
+++ b/auth/params.go
@@ -1,8 +1,22 @@
 package auth
 
+import "gitlab.com/elixxir/client/e2e/parse/partition"
+
 type Param struct {
 	ReplayRequests bool
 
 	RequestTag string
 	ResetTag   string
 }
+
+type PartPacket map[trasferID][]part
+
+func (pp PartPacket) Add(transferid, part) {
+	list, exist := PartPacket[transferid]
+	if exist {
+		PartPacket[transferid] = append(list, part)
+	} else {
+		PartPacket[transferid][]
+		part{part}
+	}
+}
diff --git a/auth/request.go b/auth/request.go
index cf34b7c08..a40acddbd 100644
--- a/auth/request.go
+++ b/auth/request.go
@@ -116,7 +116,7 @@ func (s *State) requestAuth(partner, me contact.Contact,
 	p.DebugTag = "auth.Request"
 	svc := message.Service{
 		Identifier: partner.ID.Marshal(),
-		Tag:        catalog.Default,
+		Tag:        catalog.Request,
 		Metadata:   nil,
 	}
 	round, _, err := s.net.SendCMIX(partner.ID, requestfp, svc, contents, mac, p)
diff --git a/auth/state.go b/auth/state.go
index 698e157e0..052b475f4 100644
--- a/auth/state.go
+++ b/auth/state.go
@@ -39,8 +39,15 @@ type State struct {
 	params Param
 }
 
+type identity struct {
+	identity                *id.ID
+	pubkey, privkey         *cyclic.Int
+	request, confirm, reset Callback
+}
+
 func NewManager(kv *versioned.KV, net network.Manager, e2e e2e.Handler,
-	rng *fastRNG.StreamGenerator, event event.Manager, params Param) *State {
+	rng *fastRNG.StreamGenerator, event event.Manager, params Param,
+	defaultID []identity) *State {
 	m := &State{
 		requestCallbacks: newCallbackMap(),
 		confirmCallbacks: newCallbackMap(),
-- 
GitLab