Changeset View
Changeset View
Standalone View
Standalone View
lib/file_wopi.php
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | class file_wopi extends file_document | ||||
public function session_start($file, &$file_info, &$session_id = null, $readonly = false) | public function session_start($file, &$file_info, &$session_id = null, $readonly = false) | ||||
{ | { | ||||
parent::session_start($file, $file_info, $session_id, $readonly); | parent::session_start($file, $file_info, $session_id, $readonly); | ||||
if ($session_id) { | if ($session_id) { | ||||
// Create Chwala session for use as WOPI access_token | // Create Chwala session for use as WOPI access_token | ||||
// This session will have access to this one document session only | // This session will have access to this one document session only | ||||
$keys = array('env', 'user_id', 'user', 'username', 'password', | $keys = array('env', 'user_id', 'user', 'username', 'password', | ||||
'storage_host', 'storage_port', 'storage_ssl'); | 'storage_host', 'storage_port', 'storage_ssl', 'user_roledns'); | ||||
$data = array_intersect_key($_SESSION, array_flip($keys)); | $data = array_intersect_key($_SESSION, array_flip($keys)); | ||||
$data['document_session'] = $session_id; | $data['document_session'] = $session_id; | ||||
$this->token = $this->api->session->create($data); | $this->token = $this->api->session->create($data); | ||||
$this->log_login($session_id); | $this->log_login($session_id); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 278 Lines • Show Last 20 Lines |