You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2014/08/18 11:43:46 UTC

[21/22] git commit: updated refs/heads/saml2 to 54986d5

SAML2LoginAPIAuthenticatorCmd: Set all necessary cookies and redirect to UI

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ce285f6b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ce285f6b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ce285f6b

Branch: refs/heads/saml2
Commit: ce285f6bbea3ee3fa1c9e6f921b2baaa58983314
Parents: f80f668
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Mon Aug 18 04:20:54 2014 +0200
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Mon Aug 18 11:42:35 2014 +0200

----------------------------------------------------------------------
 server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ce285f6b/server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java b/server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java
index 4e17d3d..1f88c1c 100644
--- a/server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java
+++ b/server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java
@@ -324,7 +324,9 @@ public class SAML2LoginAPIAuthenticatorCmd extends BaseCmd implements APIAuthent
                             resp.addCookie(new Cookie("username", URLEncoder.encode(loginResponse.getUsername(), HttpUtils.UTF_8)));
                             resp.addCookie(new Cookie("sessionKey", URLEncoder.encode(loginResponse.getSessionKey(), HttpUtils.UTF_8)));
                             resp.addCookie(new Cookie("account", URLEncoder.encode(loginResponse.getAccount(), HttpUtils.UTF_8)));
-                            //resp.sendRedirect("http://localhost:8080/client");
+                            resp.addCookie(new Cookie("timezone", URLEncoder.encode(loginResponse.getTimeZone(), HttpUtils.UTF_8)));
+                            resp.addCookie(new Cookie("userfullname", URLEncoder.encode(loginResponse.getFirstName() + " " + loginResponse.getLastName(), HttpUtils.UTF_8)));
+                            resp.sendRedirect("http://localhost:8080/client");
                             return ApiResponseSerializer.toSerializedString(loginResponse, responseType);
 
                         }