/** * This method provide token validation. If parameter token is empty, previous * assigned token is validated. If the token is valid, information about logged * user is stored. * * @static * @param string * @returns bool */ public static function validateToken($token) { self::logDebug('validateToken: ' . $token, 3); $result = false; if ($token == null || $token == '') { $token = self::$m_Token; } if ($token != '') { self::logDebug('Validate token: ' . $token, 1); //$url = self::GEOPORTAL_HOST . self::VALIDATE_URL . $token; $url = LIFERAY_VALIDATE_URL . '/sso/validate/' . $token; $responseJson = self::getSSOResponse($url); $response = self::json2array($responseJson); self::logDebug('responseJson: ' . $responseJson, 3); self::logDebug('response: ' . print_r($response, true), 3); if ($response['resultCode'] == '0') { $result = true; self::$m_Token = $token; self::$m_LeaseInterval = $response['leaseInterval']; self::$m_UserInfo = $response['userInfo']; } else { self::$m_Token = ''; self::$m_UserInfo = null; } } return $result; }
function groupExist($group) { return IBMGeoportalSSO::groupExist($group); }