From 9bea6f2fecc078aeae05644f83eadcd755968871 Mon Sep 17 00:00:00 2001 From: nyagamunene Date: Wed, 8 Jan 2025 13:46:37 +0300 Subject: [PATCH] fix failing linter Signed-off-by: nyagamunene --- clients/middleware/pat.go | 3 --- users/middleware/pat.go | 2 -- 2 files changed, 5 deletions(-) diff --git a/clients/middleware/pat.go b/clients/middleware/pat.go index c8dc0de5604..544ed26f2f5 100644 --- a/clients/middleware/pat.go +++ b/clients/middleware/pat.go @@ -15,8 +15,6 @@ import ( "github.com/absmach/supermq/pkg/roles" ) -const emptyDomain = "" - var _ clients.Service = (*patMiddleware)(nil) type patMiddleware struct { @@ -31,7 +29,6 @@ func PATMiddleware(svc clients.Service, pat smqpat.Authorization) clients.Servic } } -// authorizePAT validates Personal Access Token if present in the session func (pm *patMiddleware) authorizePAT(ctx context.Context, session authn.Session, platformEntityType smqauth.PlatformEntityType, optionalDomainEntityType smqauth.DomainEntityType, OptionalDomainID string, operation smqauth.OperationType, entityIDs []string) error { if session.Type != authn.PersonalAccessToken { return nil diff --git a/users/middleware/pat.go b/users/middleware/pat.go index 6a770a41d88..6db1058c259 100644 --- a/users/middleware/pat.go +++ b/users/middleware/pat.go @@ -25,7 +25,6 @@ type patMiddleware struct { pat smqpat.Authorization } -// PATMiddleware adds PAT validation to the users service. func PATMiddleware(svc users.Service, pat smqpat.Authorization) users.Service { return &patMiddleware{ svc: svc, @@ -33,7 +32,6 @@ func PATMiddleware(svc users.Service, pat smqpat.Authorization) users.Service { } } -// authorizePAT validates Personal Access Token if present in the session func (pm *patMiddleware) authorizePAT(ctx context.Context, session authn.Session, platformEntityType smqauth.PlatformEntityType, optionalDomainEntityType smqauth.DomainEntityType, OptionalDomainID string, operation smqauth.OperationType, entityIDs []string) error { if session.Type != authn.PersonalAccessToken { return nil