Minor fixes

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2014-08-18 04:31:46 +02:00
parent 2464e02bf4
commit a364054db6
2 changed files with 2 additions and 2 deletions

View File

@ -325,7 +325,7 @@ public class SAML2LoginAPIAuthenticatorCmd extends BaseCmd implements APIAuthent
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.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.addCookie(new Cookie("userfullname", loginResponse.getFirstName() + "%20" + loginResponse.getLastName()));
resp.sendRedirect("http://localhost:8080/client");
return ApiResponseSerializer.toSerializedString(loginResponse, responseType);

View File

@ -132,7 +132,7 @@
g_mySession = $.cookie('JSESSIONID');
g_sessionKey = $.cookie('sessionKey');
// Unbox quotes from sessionKey cookie value
if (g_sessionKey[0] === '"' && g_sessionKey[g_sessionKey.length-1] === '"') {
if (g_sessionKey && g_sessionKey[0] === '"' && g_sessionKey[g_sessionKey.length-1] === '"') {
g_sessionKey = g_sessionKey.slice(1, g_sessionKey.length-1);
$.cookie('sessionKey', g_sessionKey, {
expires: 1