code review fix

Change-Id: Ie616543094aaa31d596980ba7a3cef05de4351fc
diff --git a/src/challenge/challenge-credential.cpp b/src/challenge/challenge-credential.cpp
index cac5aa0..51ba94c 100644
--- a/src/challenge/challenge-credential.cpp
+++ b/src/challenge/challenge-credential.cpp
@@ -135,7 +135,7 @@
 
 Block
 ChallengeCredential::genChallengeRequestTLV(Status status, const std::string& challengeStatus,
-                                            std::multimap<std::string, std::string>&& params)
+                                            const std::multimap<std::string, std::string>& params)
 {
   Block request(tlv::EncryptedPayload);
   if (status == Status::BEFORE_CHALLENGE) {
diff --git a/src/challenge/challenge-credential.hpp b/src/challenge/challenge-credential.hpp
index 7b48483..30fb933 100644
--- a/src/challenge/challenge-credential.hpp
+++ b/src/challenge/challenge-credential.hpp
@@ -61,7 +61,7 @@
 
   Block
   genChallengeRequestTLV(Status status, const std::string& challengeStatus,
-                         std::multimap<std::string, std::string>&& params) override;
+                         const std::multimap<std::string, std::string>& params) override;
 
   static void
   fulfillParameters(std::multimap<std::string, std::string>& params,
diff --git a/src/challenge/challenge-email.cpp b/src/challenge/challenge-email.cpp
index ba0a0e8..af0303e 100644
--- a/src/challenge/challenge-email.cpp
+++ b/src/challenge/challenge-email.cpp
@@ -124,7 +124,7 @@
 
 Block
 ChallengeEmail::genChallengeRequestTLV(Status status, const std::string& challengeStatus,
-                                       std::multimap<std::string, std::string>&& params)
+                                       const std::multimap<std::string, std::string>& params)
 {
   Block request(tlv::EncryptedPayload);
   if (status == Status::BEFORE_CHALLENGE) {
diff --git a/src/challenge/challenge-email.hpp b/src/challenge/challenge-email.hpp
index c005b7e..e2c7267 100644
--- a/src/challenge/challenge-email.hpp
+++ b/src/challenge/challenge-email.hpp
@@ -65,7 +65,7 @@
 
   Block
   genChallengeRequestTLV(Status status, const std::string& challengeStatus,
-                         std::multimap<std::string, std::string>&& params) override;
+                         const std::multimap<std::string, std::string>& params) override;
 
   // challenge status
   static const std::string NEED_CODE;
diff --git a/src/challenge/challenge-module.cpp b/src/challenge/challenge-module.cpp
index 708cbb6..f184ca9 100644
--- a/src/challenge/challenge-module.cpp
+++ b/src/challenge/challenge-module.cpp
@@ -73,7 +73,7 @@
 }
 
 std::tuple<ErrorCode, std::string>
-ChallengeModule::returnWithError(ca::RequestState& request, ErrorCode errorCode, std::string&& errorInfo)
+ChallengeModule::returnWithError(ca::RequestState& request, ErrorCode errorCode, std::string errorInfo)
 {
   request.status = Status::FAILURE;
   request.challengeType = "";
@@ -83,12 +83,13 @@
 
 std::tuple<ErrorCode, std::string>
 ChallengeModule::returnWithNewChallengeStatus(ca::RequestState& request, const std::string& challengeStatus,
-                                              JsonSection&& challengeSecret, size_t remainingTries, time::seconds remainingTime)
+                                              JsonSection challengeSecret, size_t remainingTries,
+                                              time::seconds remainingTime)
 {
   request.status = Status::CHALLENGE;
   request.challengeType = CHALLENGE_TYPE;
-  request.challengeState = ca::ChallengeState(challengeStatus, time::system_clock::now(), remainingTries, remainingTime,
-                                              std::move(challengeSecret));
+  request.challengeState = ca::ChallengeState(challengeStatus, time::system_clock::now(), remainingTries,
+                                              remainingTime, std::move(challengeSecret));
   return std::make_tuple(ErrorCode::NO_ERROR, "");
 }
 
diff --git a/src/challenge/challenge-module.hpp b/src/challenge/challenge-module.hpp
index 02e5027..9d7d859 100644
--- a/src/challenge/challenge-module.hpp
+++ b/src/challenge/challenge-module.hpp
@@ -59,7 +59,7 @@
 
   virtual Block
   genChallengeRequestTLV(Status status, const std::string& challengeStatus,
-                         std::multimap<std::string, std::string>&& params) = 0;
+                         const std::multimap<std::string, std::string>& params) = 0;
 
   // helpers
   static std::string
@@ -68,11 +68,11 @@
 protected:
   // used by challenge modules
   std::tuple<ErrorCode, std::string>
-  returnWithError(ca::RequestState& request, ErrorCode errorCode, std::string&& errorInfo);
+  returnWithError(ca::RequestState& request, ErrorCode errorCode, std::string errorInfo);
 
   std::tuple<ErrorCode, std::string>
   returnWithNewChallengeStatus(ca::RequestState& request, const std::string& challengeStatus,
-                               JsonSection&& challengeSecret, size_t remainingTries, time::seconds remainingTime);
+                               JsonSection challengeSecret, size_t remainingTries, time::seconds remainingTime);
 
   std::tuple<ErrorCode, std::string>
   returnWithSuccess(ca::RequestState& request);
diff --git a/src/challenge/challenge-pin.cpp b/src/challenge/challenge-pin.cpp
index 26e5317..5d3ea8a 100644
--- a/src/challenge/challenge-pin.cpp
+++ b/src/challenge/challenge-pin.cpp
@@ -105,7 +105,7 @@
 
 Block
 ChallengePin::genChallengeRequestTLV(Status status, const std::string& challengeStatus,
-                                     std::multimap<std::string, std::string>&& params)
+                                     const std::multimap<std::string, std::string>& params)
 {
   Block request(tlv::EncryptedPayload);
   if (status == Status::BEFORE_CHALLENGE) {
diff --git a/src/challenge/challenge-pin.hpp b/src/challenge/challenge-pin.hpp
index 757870d..61e0fb6 100644
--- a/src/challenge/challenge-pin.hpp
+++ b/src/challenge/challenge-pin.hpp
@@ -60,7 +60,7 @@
 
   Block
   genChallengeRequestTLV(Status status, const std::string& challengeStatus,
-                         std::multimap<std::string, std::string>&& params) override;
+                         const std::multimap<std::string, std::string>& params) override;
 
   // challenge status
   static const std::string NEED_CODE;