NOISSUE - Housekeeping

Signed-off-by: dusan <borovcanindusan1@gmail.com>
This commit is contained in:
dusan
2025-11-28 19:28:12 +01:00
parent 8e8e02f0cb
commit 5e504aa104
10 changed files with 953 additions and 42 deletions
+2 -3
View File
@@ -15,7 +15,6 @@ import (
"github.com/absmach/magistrala/bootstrap/events/producer"
"github.com/absmach/magistrala/bootstrap/mocks"
"github.com/absmach/magistrala/internal/testsutil"
"github.com/absmach/supermq/pkg/authn"
smqauthn "github.com/absmach/supermq/pkg/authn"
"github.com/absmach/supermq/pkg/errors"
svcerr "github.com/absmach/supermq/pkg/errors/service"
@@ -990,7 +989,7 @@ func TestChangeState(t *testing.T) {
token string
session smqauthn.Session
state bootstrap.State
authResponse authn.Session
authResponse smqauthn.Session
authorizeErr error
connectErr error
retrieveErr error
@@ -1006,7 +1005,7 @@ func TestChangeState(t *testing.T) {
userID: validID,
domainID: domainID,
state: bootstrap.Active,
authResponse: authn.Session{},
authResponse: smqauthn.Session{},
err: nil,
event: map[string]any{
"client_id": config.ClientID,
+2 -3
View File
@@ -9,7 +9,6 @@ import (
"github.com/absmach/magistrala/bootstrap"
smqauthn "github.com/absmach/supermq/pkg/authn"
"github.com/absmach/supermq/pkg/authz"
smqauthz "github.com/absmach/supermq/pkg/authz"
"github.com/absmach/supermq/pkg/policies"
)
@@ -23,11 +22,11 @@ var _ bootstrap.Service = (*authorizationMiddleware)(nil)
type authorizationMiddleware struct {
svc bootstrap.Service
authz smqauthz.Authorization
authz authz.Authorization
}
// AuthorizationMiddleware adds authorization to the clients service.
func AuthorizationMiddleware(svc bootstrap.Service, authz smqauthz.Authorization) bootstrap.Service {
func AuthorizationMiddleware(svc bootstrap.Service, authz authz.Authorization) bootstrap.Service {
return &authorizationMiddleware{
svc: svc,
authz: authz,