@@ -17,15 +17,14 @@ import (
17
17
grpcAuthV1 "github.com/absmach/supermq/api/grpc/auth/v1"
18
18
grpcTokenV1 "github.com/absmach/supermq/api/grpc/token/v1"
19
19
"github.com/absmach/supermq/auth"
20
- api "github.com/absmach/supermq/auth/api"
21
20
authgrpcapi "github.com/absmach/supermq/auth/api/grpc/auth"
22
21
tokengrpcapi "github.com/absmach/supermq/auth/api/grpc/token"
23
22
httpapi "github.com/absmach/supermq/auth/api/http"
24
23
"github.com/absmach/supermq/auth/bolt"
25
24
"github.com/absmach/supermq/auth/hasher"
26
25
"github.com/absmach/supermq/auth/jwt"
26
+ "github.com/absmach/supermq/auth/middleware"
27
27
apostgres "github.com/absmach/supermq/auth/postgres"
28
- "github.com/absmach/supermq/auth/tracing"
29
28
boltclient "github.com/absmach/supermq/internal/clients/bolt"
30
29
smqlog "github.com/absmach/supermq/logger"
31
30
"github.com/absmach/supermq/pkg/jaeger"
@@ -244,10 +243,10 @@ func newService(_ context.Context, db *sqlx.DB, tracer trace.Tracer, cfg config,
244
243
t := jwt .New ([]byte (cfg .SecretKey ))
245
244
246
245
svc := auth .New (keysRepo , patsRepo , hasher , idProvider , t , pEvaluator , pService , cfg .AccessDuration , cfg .RefreshDuration , cfg .InvitationDuration )
247
- svc = api . LoggingMiddleware (svc , logger )
246
+ svc = middleware . Logging (svc , logger )
248
247
counter , latency := prometheus .MakeMetrics ("auth" , "api" )
249
- svc = api . MetricsMiddleware (svc , counter , latency )
250
- svc = tracing . New (svc , tracer )
248
+ svc = middleware . Metrics (svc , counter , latency )
249
+ svc = middleware . Tracing (svc , tracer )
251
250
252
251
return svc
253
252
}
0 commit comments