markusthoemmes commented on a change in pull request #3829: Introduce SPI to 
swap authentication directives
URL: 
https://github.com/apache/incubator-openwhisk/pull/3829#discussion_r201978237
 
 

 ##########
 File path: 
core/controller/src/main/scala/whisk/core/controller/BasicAuthenticationDirective.scala
 ##########
 @@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package whisk.core.controller
+
+import akka.actor.ActorSystem
+import akka.http.scaladsl.model.HttpRequest
+import akka.http.scaladsl.model.headers._
+import akka.http.scaladsl.server.Directives._
+import akka.http.scaladsl.server.directives.{AuthenticationDirective, 
AuthenticationResult}
+import akka.stream.ActorMaterializer
+import whisk.common.{Logging, TransactionId}
+import whisk.core.entity._
+import whisk.core.entity.types.AuthStore
+
+import scala.concurrent.{ExecutionContext, Future}
+
+class AuthenticatedRouteBasicAuth(implicit val authStore: AuthStore,
+                                  implicit val actorSystem: ActorSystem,
+                                  implicit val httpRequest: HttpRequest,
+                                  implicit val materializer: ActorMaterializer,
 
 Review comment:
   As per f2f discussion, please have a look at various `extractX` methods to 
combine the directives and avoid broad interfaces.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to