From 62d18539a7b0f9acf87343e618ffe82e208f819e Mon Sep 17 00:00:00 2001 From: Jeff Yanta Date: Tue, 9 Jan 2024 15:24:11 -0500 Subject: [PATCH] Remove fields from login protos --- go.mod | 4 ++-- go.sum | 4 ++-- pkg/code/server/grpc/messaging/server_test.go | 2 -- pkg/code/server/grpc/messaging/testutil.go | 4 ---- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 6a2d51b0..4f6b43c3 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( firebase.google.com/go/v4 v4.8.0 github.com/aws/aws-sdk-go-v2 v0.17.0 github.com/bits-and-blooms/bloom/v3 v3.1.0 - github.com/code-payments/code-protobuf-api v1.4.0 + github.com/code-payments/code-protobuf-api v1.6.0 github.com/emirpasic/gods v1.12.0 github.com/envoyproxy/protoc-gen-validate v0.1.0 github.com/golang-jwt/jwt/v5 v5.0.0 @@ -41,6 +41,7 @@ require ( golang.org/x/crypto v0.14.0 golang.org/x/image v0.0.0-20211028202545-6944b10bf410 golang.org/x/net v0.17.0 + golang.org/x/text v0.13.0 golang.org/x/time v0.0.0-20191024005414-555d28b269f0 google.golang.org/grpc v1.51.0 google.golang.org/protobuf v1.28.1 @@ -102,7 +103,6 @@ require ( go.opencensus.io v0.23.0 // indirect golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a // indirect golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/api v0.73.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/go.sum b/go.sum index d04e3aa7..2e2946ee 100644 --- a/go.sum +++ b/go.sum @@ -108,8 +108,8 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/code-payments/code-protobuf-api v1.4.0 h1:rOmjLvP/nIgh9xlFud4bhweg6GN1JAD2M1NdILcpfaU= -github.com/code-payments/code-protobuf-api v1.4.0/go.mod h1:pHQm75vydD6Cm2qHAzlimW6drysm489Z4tVxC2zHSsU= +github.com/code-payments/code-protobuf-api v1.6.0 h1:u+za1DMu7gyH9RqeAlpxtpe1QR57Yywq/Sh2d1MNT3k= +github.com/code-payments/code-protobuf-api v1.6.0/go.mod h1:pHQm75vydD6Cm2qHAzlimW6drysm489Z4tVxC2zHSsU= github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6 h1:NmTXa/uVnDyp0TY5MKi197+3HWcnYWfnHGyaFthlnGw= github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= diff --git a/pkg/code/server/grpc/messaging/server_test.go b/pkg/code/server/grpc/messaging/server_test.go index 8d3abee2..a1569320 100644 --- a/pkg/code/server/grpc/messaging/server_test.go +++ b/pkg/code/server/grpc/messaging/server_test.go @@ -604,7 +604,6 @@ func TestSendMessage_RequestToLogin_HappyPath(t *testing.T) { require.NotNil(t, savedProtoMessage.GetRequestToLogin()) assert.Equal(t, sendMessageCall.req.Message.GetRequestToLogin().Verifier.Value, savedProtoMessage.GetRequestToLogin().Verifier.Value) assert.Equal(t, sendMessageCall.req.Message.GetRequestToLogin().Domain.Value, savedProtoMessage.GetRequestToLogin().Domain.Value) - assert.Equal(t, sendMessageCall.req.Message.GetRequestToLogin().Nonce.Value, savedProtoMessage.GetRequestToLogin().Nonce.Value) assert.Equal(t, sendMessageCall.req.Message.GetRequestToLogin().Signature.Value, savedProtoMessage.GetRequestToLogin().Signature.Value) assert.Equal(t, sendMessageCall.req.Message.GetRequestToLogin().RendezvousKey.Value, savedProtoMessage.GetRequestToLogin().RendezvousKey.Value) assert.Equal(t, sendMessageCall.req.Signature.Value, savedProtoMessage.SendMessageRequestSignature.Value) @@ -678,7 +677,6 @@ func TestSendMessage_LoginAttempt_HappyPath(t *testing.T) { require.NotNil(t, savedProtoMessage.GetLoginAttempt()) assert.Equal(t, sendMessageCall.req.Message.GetLoginAttempt().UserId.Value, savedProtoMessage.GetLoginAttempt().UserId.Value) assert.Equal(t, sendMessageCall.req.Message.GetLoginAttempt().Domain.Value, savedProtoMessage.GetLoginAttempt().Domain.Value) - assert.Equal(t, sendMessageCall.req.Message.GetLoginAttempt().Nonce.Value, savedProtoMessage.GetLoginAttempt().Nonce.Value) assert.Equal(t, sendMessageCall.req.Message.GetLoginAttempt().Signature.Value, savedProtoMessage.GetLoginAttempt().Signature.Value) assert.Equal(t, sendMessageCall.req.Message.GetLoginAttempt().RendezvousKey.Value, savedProtoMessage.GetLoginAttempt().RendezvousKey.Value) assert.Equal(t, sendMessageCall.req.Signature.Value, savedProtoMessage.SendMessageRequestSignature.Value) diff --git a/pkg/code/server/grpc/messaging/testutil.go b/pkg/code/server/grpc/messaging/testutil.go index 19e2011e..049966ed 100644 --- a/pkg/code/server/grpc/messaging/testutil.go +++ b/pkg/code/server/grpc/messaging/testutil.go @@ -801,8 +801,6 @@ func (c *clientEnv) sendRequestToLoginMessage(t *testing.T, rendezvousKey *commo Domain: &commonpb.Domain{ Value: "app.getcode.com", }, - Nonce: testutil.NewRandomAccount(t).ToProto(), - Timestamp: timestamppb.Now(), RendezvousKey: &messagingpb.RendezvousKey{ Value: rendezvousKey.PublicKey().ToBytes(), }, @@ -868,8 +866,6 @@ func (c *clientEnv) sendLoginAttemptMessage(t *testing.T, rendezvousKey *common. Domain: &commonpb.Domain{ Value: "app.getcode.com", }, - Nonce: testutil.NewRandomAccount(t).ToProto(), - Timestamp: timestamppb.Now(), RendezvousKey: &messagingpb.RendezvousKey{ Value: rendezvousKey.PublicKey().ToBytes(), },