airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject airavata-php-gateway git commit: adding capacha verification
Date Thu, 11 Feb 2016 14:40:23 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/master e8ff24991 -> 2fa72cd78


adding capacha verification


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/2fa72cd7
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/2fa72cd7
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/2fa72cd7

Branch: refs/heads/master
Commit: 2fa72cd7803efb863064c699016f5b8fc4f6f03b
Parents: e8ff249
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Thu Feb 11 09:40:19 2016 -0500
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Thu Feb 11 09:40:19 2016 -0500

----------------------------------------------------------------------
 .../Wsis/Stubs/UserInformationRecoveryManager.php  | 17 ++++++++++++++---
 app/libraries/Wsis/Wsis.php                        | 12 ++++++++++--
 2 files changed, 24 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2fa72cd7/app/libraries/Wsis/Stubs/UserInformationRecoveryManager.php
----------------------------------------------------------------------
diff --git a/app/libraries/Wsis/Stubs/UserInformationRecoveryManager.php b/app/libraries/Wsis/Stubs/UserInformationRecoveryManager.php
index e03788d..49490aa 100755
--- a/app/libraries/Wsis/Stubs/UserInformationRecoveryManager.php
+++ b/app/libraries/Wsis/Stubs/UserInformationRecoveryManager.php
@@ -142,13 +142,24 @@ class UserInformationRecoveryManager {
      * @param $userName
      * @param $tenantDomain
      */
-    public function confirmUserRegistration($userName, $code, $tenantDomain){
+    public function confirmUserRegistration($userAnswer, $imagePath, $secret, $userName,
$code, $tenantDomain){
         $confirmUserSelfRegistration = new confirmUserSelfRegistration();
         $confirmUserSelfRegistration->username = $userName;
         $confirmUserSelfRegistration->code = $code;
         $confirmUserSelfRegistration->tenantDomain = $tenantDomain;
+        $confirmUserSelfRegistration->captcha = new CaptchaInfoBean();
+        $confirmUserSelfRegistration->captcha->userAnswer = $userAnswer;
+        $confirmUserSelfRegistration->captcha->imagePath = $imagePath;
+        $confirmUserSelfRegistration->captcha->secretKey = $secret;
         $result = $this->serviceStub->confirmUserSelfRegistration($confirmUserSelfRegistration);
-        return $result->return->verified;
-        return $result->return->verified;
+        return $result->return;
+    }
+
+    /**
+     * Public function to get Capatcha
+     * @return getCaptchaResponse
+     */
+    public function getCapatcha(){
+        return $this->serviceStub->getCaptcha(new getCaptcha());
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2fa72cd7/app/libraries/Wsis/Wsis.php
----------------------------------------------------------------------
diff --git a/app/libraries/Wsis/Wsis.php b/app/libraries/Wsis/Wsis.php
index aa40bda..034da6d 100755
--- a/app/libraries/Wsis/Wsis.php
+++ b/app/libraries/Wsis/Wsis.php
@@ -444,8 +444,8 @@ class Wsis {
      * @param $userName
      * @param $tenantDomain
      */
-    public function confirmUserRegistration($userName, $code, $tenantDomain){
-        return $this->userInfoRecoveryManager->confirmUserRegistration($userName, $code,
$tenantDomain);
+    public function confirmUserRegistration($userAnswer, $imagePath, $secret, $userName,
$code, $tenantDomain){
+        return $this->userInfoRecoveryManager->confirmUserRegistration($userAnswer,
$imagePath, $secret, $userName, $code, $tenantDomain);
     }
 
     /**
@@ -493,4 +493,12 @@ class Wsis {
     public function resetPassword($username, $newPassword, $key){
         return $this->userInfoRecoveryManager->resetPassword($username, $newPassword,
$key);
     }
+
+    /**
+     * Method to get a capatcha
+     * @return mixed
+     */
+    public function getCapatcha(){
+        return $this->userInfoRecoveryManager->getCapatcha();
+    }
 } 
\ No newline at end of file


Mime
View raw message