Skip to content

Commit

Permalink
v2.2.1 (#7)
Browse files Browse the repository at this point in the history
* v2.2.1
- bug fix of Fairplay (#6)
- The license url has been changed.
  • Loading branch information
jinseok-Noh authored Apr 20, 2023
1 parent 4f36fb9 commit cf2c718
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/Common/AutoLoad.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

$base_path = __DIR__."".DIRECTORY_SEPARATOR;
$class_path = $base_path . $className . '.php';
$class_path = str_replace("\\", "/", $class_path);
// $class_path = str_replace("\\", "/", $class_path);

if ( $dir == "TokenSample/" ){ // TokenSample Path
$class_path = str_replace(DIRECTORY_SEPARATOR ."Common". DIRECTORY_SEPARATOR."PallyCon".DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR."TokenSample".DIRECTORY_SEPARATOR, $class_path);
}else{
$class_path = str_replace(DIRECTORY_SEPARATOR ."Common". DIRECTORY_SEPARATOR."PallyConProxy".DIRECTORY_SEPARATOR, "".DIRECTORY_SEPARATOR, $class_path);
$class_path = str_replace(DIRECTORY_SEPARATOR ."Common". DIRECTORY_SEPARATOR."PallyConProxy".DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, $class_path);
}

if(file_exists( $class_path )) {
Expand Down
2 changes: 1 addition & 1 deletion src/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'siteId'=> '',
'siteKey'=> '',
'accessKey'=> '',
'license_url'=>'https://license.pallycon.com/ri/licenseManager.do',
'license_url'=>'https://license-global.pallycon.com/ri/licenseManager.do',
'token_res_format' => 'original',
'proxy_response_format' => 'original',
];
Expand Down
1 change: 0 additions & 1 deletion src/Service/ProxyService.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ private function callLicenseServer($_mode, $_url, $_requestBody, $_pallyconCusto
$drmType = new DrmType();
if ( strtoupper($_drmType) == $drmType::FAIRPLAY ){
array_push($_headerData, "Content-Type: application/x-www-form-urlencoded");
$_requestBody = "spc=". implode(array_map("chr", $_requestBody));

}else if ( strtoupper($_drmType) == $drmType::NCG ){
array_push($_headerData, "Content-Type: application/x-www-form-urlencoded");
Expand Down
6 changes: 0 additions & 6 deletions src/proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,8 @@
// get Parameter
$_requestBody = file_get_contents("php://input"); // get raw data
$_drmType = $_REQUEST["drmType"];
$_spc = $_POST["spc"];
$_mode = @$_REQUEST["mode"];

// FairPlay
if ( strtoupper($_drmType) == $drmType::FAIRPLAY ) {
$_requestBody = $util->getBytes($_spc);
}

// get License data
$_responseData = $proxyService->getLicenseData($_mode, $_pallyconClientMeta, $_requestBody, $_drmType);

Expand Down

0 comments on commit cf2c718

Please sign in to comment.