mirror of
https://github.com/absmach/supermq.git
synced 2026-06-23 07:40:17 +00:00
NOISSUE - Housekeeping
Signed-off-by: dusan <borovcanindusan1@gmail.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user