'', 'id_cairn' => '', 'id_empr' => '', 'expiration' => 0, 'error' => false, 'error_message' => '' ); $sessions_token = new sessions_tokens('cairn'); $sessions_token->set_token($token); if (!$sessions_token->is_valid()) { $this->error = true; $this->error_message = $this->msg['cairn_error_invalid_token']; $response['error'] = $this->error; $response['error_message'] = $this->error_message.' : '.$token; return encoding_normalize::utf8_normalize($response); } // La récupération du login suffit à valider le token et la session $sessid = md5($sessions_token->get_SESSID()); $session_expiration = $sessions_token->get_expiration(); $empr_login = $sessions_token->get_login(); $cairn_connector = new cairn(); $empr_id = $cairn_connector->get_empr_id($empr_login); $id_cairn = $cairn_connector->get_cairn_id(); $response['SESSID'] = $sessid; $response['id_cairn'] = $id_cairn; $response['id_empr'] = $empr_id; $response['expiration'] = $session_expiration; return encoding_normalize::utf8_normalize($response); } }