You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/09/27 19:11:04 UTC

[1/2] airavata-php-gateway git commit: API login endpoint

Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop d1d6d037f -> fdaa72c96


API login endpoint


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/be72a459
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/be72a459
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/be72a459

Branch: refs/heads/develop
Commit: be72a45905794fb9253a82eaff82d928f4ab80c9
Parents: fa310a1
Author: Marcus Christie <ma...@iu.edu>
Authored: Wed Sep 27 13:31:39 2017 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Wed Sep 27 13:31:39 2017 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php | 7 +++++++
 app/routes.php                        | 2 ++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/be72a459/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index f9ea073..eff4f38 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -180,6 +180,13 @@ class AccountController extends BaseController
 
     }
 
+    public function apiLoginSubmit() {
+        $username = strtolower(Input::get("username"));
+        $password = Input::get("password");
+        $response = Keycloak::authenticate($username, $password);
+        return Response::json($response);
+    }
+
     public function oauthCallback()
     {
         if (!isset($_GET["code"])) {

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/be72a459/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
index 61f15eb..9e876d6 100755
--- a/app/routes.php
+++ b/app/routes.php
@@ -34,6 +34,8 @@ Route::get("callback-url", "AccountController@oauthCallback");
 
 Route::get("logout", "AccountController@logout");
 
+Route::post("api-login", "AccountController@apiLoginSubmit");
+
 Route::get("forgot-password", "AccountController@forgotPassword");
 
 Route::get("reset-password", "AccountController@resetPassword");


[2/2] airavata-php-gateway git commit: Merge branch 'api-auth-endpoint' into develop

Posted by ma...@apache.org.
Merge branch 'api-auth-endpoint' into develop


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/fdaa72c9
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/fdaa72c9
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/fdaa72c9

Branch: refs/heads/develop
Commit: fdaa72c962d6f261da7373a9aaa37e441e0b1330
Parents: d1d6d03 be72a45
Author: Marcus Christie <ma...@iu.edu>
Authored: Wed Sep 27 13:31:52 2017 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Wed Sep 27 13:31:52 2017 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php | 7 +++++++
 app/routes.php                        | 2 ++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/fdaa72c9/app/controllers/AccountController.php
----------------------------------------------------------------------