Skip to content

Commit 45456ac

Browse files
committed
chore: update mgate version
Signed-off-by: Felix Gateru <[email protected]>
1 parent 26974fa commit 45456ac

File tree

6 files changed

+9
-4
lines changed

6 files changed

+9
-4
lines changed

apidocs/openapi/http.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ paths:
4747
description: Message discarded due to its malformed content.
4848
"401":
4949
description: Missing or invalid access token provided.
50+
"403":
51+
description: Access denied to the requested resource.
5052
"404":
5153
description: Message discarded due to invalid channel id.
5254
"415":

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/0x6flab/namegenerator v1.4.0
77
github.com/absmach/callhome v0.14.0
88
github.com/absmach/certs v0.0.0-20250602111612-89538302ad6a
9-
github.com/absmach/mgate v0.4.6-0.20250605150648-edf967fbb46a
9+
github.com/absmach/mgate v0.4.6-0.20250616124539-13181c84f1d5
1010
github.com/absmach/senml v1.0.7
1111
github.com/authzed/authzed-go v1.4.0
1212
github.com/authzed/grpcutil v0.0.0-20250221190651-1985b19b35b8

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ github.com/absmach/certs v0.0.0-20250602111612-89538302ad6a h1:swYXNJaGVQS35CeuX
2323
github.com/absmach/certs v0.0.0-20250602111612-89538302ad6a/go.mod h1:tEat7G8BzyWbFIFojqdzWSD6RZNFyEuUHBdnD0J+rZA=
2424
github.com/absmach/mgate v0.4.6-0.20250605150648-edf967fbb46a h1:1+772OQFHAS23JLAHrCZxO+DnGoiMllKcSwLQy74y+k=
2525
github.com/absmach/mgate v0.4.6-0.20250605150648-edf967fbb46a/go.mod h1:X2amjQg/2cnM+UKblMdpU2M4cZO74xtEHNIxtuUXCeA=
26+
github.com/absmach/mgate v0.4.6-0.20250616124539-13181c84f1d5 h1:cbJncI2bzHxj4y0znacoVlamVi9rN2ERVuHGMU3hCRc=
27+
github.com/absmach/mgate v0.4.6-0.20250616124539-13181c84f1d5/go.mod h1:X2amjQg/2cnM+UKblMdpU2M4cZO74xtEHNIxtuUXCeA=
2628
github.com/absmach/senml v1.0.7 h1:XLvpw0qxbP2QhOz7KLM2ZRar+vSCpSG/0o0kEvWx3No=
2729
github.com/absmach/senml v1.0.7/go.mod h1:3bRIiNc8hq7l3auMs8gQrpsM5hHy7iDuiLILrf/+MfA=
2830
github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ=

http/api/endpoint_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ func TestPublish(t *testing.T) {
234234
msg: msg,
235235
contentType: ctSenmlJSON,
236236
key: clientKey,
237-
status: http.StatusBadRequest,
237+
status: http.StatusForbidden,
238238
authnRes: &grpcClientsV1.AuthnRes{Id: clientID, Authenticated: true},
239239
authzRes: &grpcChannelsV1.AuthzRes{Authorized: false},
240240
},

http/handler.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ func (h *handler) AuthPublish(ctx context.Context, topic *string, payload *[]byt
110110
if err != nil {
111111
return err
112112
}
113-
fmt.Println("Got here")
114113

115114
clientID, clientType, err := h.authAccess(ctx, string(s.Password), domainID, chanID, connections.Publish)
116115
if err != nil {

pkg/sdk/message_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,10 @@ func TestSendMessage(t *testing.T) {
114114
domainID: domainID,
115115
msg: msg,
116116
secret: "",
117+
authRes: &grpcClientsV1.AuthnRes{Authenticated: false, Id: ""},
118+
authErr: nil,
117119
svcErr: nil,
118-
err: errors.NewSDKErrorWithStatus(errors.Wrap(apiutil.ErrValidation, apiutil.ErrBearerKey), http.StatusBadRequest),
120+
err: errors.NewSDKErrorWithStatus(svcerr.ErrAuthentication, http.StatusUnauthorized),
119121
},
120122
{
121123
desc: "publish message with invalid client key",

0 commit comments

Comments
 (0)