markusthoemmes commented on a change in pull request #3788: Store and pass 
variant data in AuthKey
URL: 
https://github.com/apache/incubator-openwhisk/pull/3788#discussion_r196833607
 
 

 ##########
 File path: common/scala/src/main/scala/whisk/core/entity/AuthKey.scala
 ##########
 @@ -17,24 +17,31 @@
 
 package whisk.core.entity
 
+import akka.http.scaladsl.model.headers.{BasicHttpCredentials, HttpCredentials}
 import spray.json._
 import spray.json.DefaultJsonProtocol._
 
+trait AuthKeyEnv {
+  val authElements: Map[String, String]
+  def toEnvironment = authElements.toJson.asJsObject
+  def getCredentials: HttpCredentials
+}
 
 Review comment:
   Since `authElements` is used nowhere, what do you think about narrowing this 
interface to
   
   ```scala
   trait AuthenticationCredentials {
     def toEnvironment: JsObject
     def credentials: HttpCredentials
   }
   ```
   
   Since the interface includes the `getCredentials` bit, I think `AuthKeyEnv` 
doesn't transport the meaning of the class. After all this is about the 
credentials being passed in.

----------------------------------------------------------------
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