You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/08/20 14:45:57 UTC

[GitHub] markusthoemmes closed pull request #3902: Add implicit parameters when getting the namespace identity

markusthoemmes closed pull request #3902: Add implicit parameters when getting the namespace identity 
URL: https://github.com/apache/incubator-openwhisk/pull/3902
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/core/controller/src/main/scala/whisk/core/controller/BasicAuthenticationDirective.scala b/core/controller/src/main/scala/whisk/core/controller/BasicAuthenticationDirective.scala
index 7bc5e3235c..c0e06c5724 100644
--- a/core/controller/src/main/scala/whisk/core/controller/BasicAuthenticationDirective.scala
+++ b/core/controller/src/main/scala/whisk/core/controller/BasicAuthenticationDirective.scala
@@ -17,6 +17,7 @@
 
 package whisk.core.controller
 
+import akka.actor.ActorSystem
 import akka.http.scaladsl.model.headers._
 import akka.http.scaladsl.server.Directives._
 import akka.http.scaladsl.server.directives.{AuthenticationDirective, AuthenticationResult}
@@ -73,7 +74,8 @@ object BasicAuthenticationDirective extends AuthenticationDirectiveProvider {
     }
   }
 
-  def identityByNamespace(namespace: EntityName)(implicit transid: TransactionId, authStore: AuthStore) = {
+  def identityByNamespace(
+    namespace: EntityName)(implicit transid: TransactionId, system: ActorSystem, authStore: AuthStore) = {
     Identity.get(authStore, namespace)
   }
 
diff --git a/core/controller/src/main/scala/whisk/core/controller/RestAPIs.scala b/core/controller/src/main/scala/whisk/core/controller/RestAPIs.scala
index c21e11224e..3f69c832c3 100644
--- a/core/controller/src/main/scala/whisk/core/controller/RestAPIs.scala
+++ b/core/controller/src/main/scala/whisk/core/controller/RestAPIs.scala
@@ -343,6 +343,6 @@ trait AuthenticationDirectiveProvider extends Spi {
    * @param namespace the namespace that the identity will be based on
    * @return identity based on the given namespace
    */
-  def identityByNamespace(namespace: EntityName)(implicit transid: TransactionId,
-                                                 authStore: AuthStore): Future[Identity]
+  def identityByNamespace(
+    namespace: EntityName)(implicit transid: TransactionId, system: ActorSystem, authStore: AuthStore): Future[Identity]
 }
diff --git a/core/controller/src/main/scala/whisk/core/controller/WebActions.scala b/core/controller/src/main/scala/whisk/core/controller/WebActions.scala
index 6015525511..9081859b66 100644
--- a/core/controller/src/main/scala/whisk/core/controller/WebActions.scala
+++ b/core/controller/src/main/scala/whisk/core/controller/WebActions.scala
@@ -460,8 +460,8 @@ trait WhiskWebActionsApi extends Directives with ValidateRequestSize with PostAc
    * This method is factored out to allow mock testing.
    */
   protected def getIdentity(namespace: EntityName)(implicit transid: TransactionId): Future[Identity] = {
-
-    authenticationProvider.identityByNamespace(namespace)(transid, authStore)
+    // ask auth provider to create an identity for the given namespace
+    authenticationProvider.identityByNamespace(namespace)(transid, actorSystem, authStore)
   }
 
   private def handleMatch(namespaceSegment: String,


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services