From 2464e02bf45515c6b642b3a3a3fd62045d48ab74 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Mon, 18 Aug 2014 04:20:54 +0200 Subject: [PATCH] SAML2LoginAPIAuthenticatorCmd: Set all necessary cookies and redirect to UI Signed-off-by: Rohit Yadav --- .../src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java b/server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java index 4e17d3d9127..1f88c1cbce1 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); }