From 35770d78034bb123025878790b0530ca814d38ba Mon Sep 17 00:00:00 2001 From: amitsingh Date: Tue, 11 Jan 2022 01:04:53 +0530 Subject: [PATCH] Make middlewares package private MiddlewareRequest --- .../src/main/scala/zhttp/http/middleware/AuthMiddlewares.scala | 2 +- .../src/main/scala/zhttp/http/middleware/CorsMiddlewares.scala | 2 +- .../src/main/scala/zhttp/http/middleware/CsrfMiddlewares.scala | 2 +- .../src/main/scala/zhttp/http/middleware/HttpMiddlewares.scala | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/zio-http/src/main/scala/zhttp/http/middleware/AuthMiddlewares.scala b/zio-http/src/main/scala/zhttp/http/middleware/AuthMiddlewares.scala index d8cbaf020d..12a83d5c2d 100644 --- a/zio-http/src/main/scala/zhttp/http/middleware/AuthMiddlewares.scala +++ b/zio-http/src/main/scala/zhttp/http/middleware/AuthMiddlewares.scala @@ -4,7 +4,7 @@ import io.netty.handler.codec.http.HttpHeaderNames import zhttp.http.Headers.BasicSchemeName import zhttp.http._ -trait AuthMiddlewares { +private[zhttp] trait AuthMiddlewares { /** * Creates an authentication middleware that only allows authenticated requests to be passed on to the app. diff --git a/zio-http/src/main/scala/zhttp/http/middleware/CorsMiddlewares.scala b/zio-http/src/main/scala/zhttp/http/middleware/CorsMiddlewares.scala index 7605b1f643..931f24db8a 100644 --- a/zio-http/src/main/scala/zhttp/http/middleware/CorsMiddlewares.scala +++ b/zio-http/src/main/scala/zhttp/http/middleware/CorsMiddlewares.scala @@ -4,7 +4,7 @@ import io.netty.handler.codec.http.HttpHeaderNames import zhttp.http._ import zhttp.http.middleware.CORS.DefaultCORSConfig -trait CorsMiddlewares { +private[zhttp] trait CorsMiddlewares { /** * Creates a middleware for Cross-Origin Resource Sharing (CORS). diff --git a/zio-http/src/main/scala/zhttp/http/middleware/CsrfMiddlewares.scala b/zio-http/src/main/scala/zhttp/http/middleware/CsrfMiddlewares.scala index a6e40a234e..35be2e070e 100644 --- a/zio-http/src/main/scala/zhttp/http/middleware/CsrfMiddlewares.scala +++ b/zio-http/src/main/scala/zhttp/http/middleware/CsrfMiddlewares.scala @@ -5,7 +5,7 @@ import zio.{UIO, ZIO} import java.util.UUID -trait CsrfMiddlewares { +private[zhttp] trait CsrfMiddlewares { /** * CSRF middlewares : To prevent Cross-site request forgery attacks. This middleware is modeled after the double diff --git a/zio-http/src/main/scala/zhttp/http/middleware/HttpMiddlewares.scala b/zio-http/src/main/scala/zhttp/http/middleware/HttpMiddlewares.scala index a64f46660c..de4dcc04ee 100644 --- a/zio-http/src/main/scala/zhttp/http/middleware/HttpMiddlewares.scala +++ b/zio-http/src/main/scala/zhttp/http/middleware/HttpMiddlewares.scala @@ -12,7 +12,7 @@ import java.io.IOException /** * Middlewares on an HttpApp */ -trait HttpMiddlewares extends CorsMiddlewares with CsrfMiddlewares with AuthMiddlewares { +private[zhttp] trait HttpMiddlewares extends CorsMiddlewares with CsrfMiddlewares with AuthMiddlewares { /** * Logical operator to decide which middleware to select based on the predicate.