Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Turkish character problem on AFCS

Avatar

Level 1

I want to run an authentication by AFCS through zend_amf and php.  I’m using Tom Krsha's sample service.


<?php

require_once("afcs.php");

class AFCSService{

public $account;

public function __construct(){
  $this->account = new AFCSAccount("http://connectnow.acrobat.com/<MY ACCOUNT>");
  $this->account->login("<MY USERNAME>","<MY PASSWORD>");

}

public function getToken($room,$user,$password){

  // EXTERNAL AUTHENTICATION LOGIC
 
  if($user == "tom" && $password == "tom"){
   $session = $this->account->getSession($room);
  
   $fullname = "ÜĞŞÇİ";
   $id = 123;
   $role = 50; // publisher
  
   $token = $session->getAuthenticationToken("<MY SECRET KEY>",$fullname,$id,$role);
   return $token;
  }
 
  return null;

}

}

?>

if there is a Turkish character like "ü,ğ,ş,ç,ı" in their fullname, I'm getting error, if I replace the Turkish characters with "u,g,s,c,i" everything is Ok

Error output;

Error: Invalid username or password:Login again
at com.adobe.rtc.authentication::AbstractAuthenticator/onLoginFailure()[C:\work\main\connect\cocomo\src

\com\adobe\rtc\authentication\AbstractAuthenticator.as:182]
at com.adobe.rtc.authentication::AbstractAuthenticator/onAuthorizationFailure()[C:\work\main\connect

\cocomo\src\com\adobe\rtc\authentication\AbstractAuthenticator.as:197]
at com.adobe.rtc.session.sessionClasses::MeetingInfoService/onComplete()[C:\work\main\connect\cocomo\src

\com\adobe\rtc\session\sessionClasses\MeetingInfoService.as:313]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()


How can I solve this problem?

is there a relation with this problem and the headers in the afcs.php file?

$headers = array("Content-Type" => 'text/xml');

2 Replies

Avatar

Employee

Can you try to encode the name as utf8 ? If that works I'll update the method and do it there:

$fullname = utf8_encode("ÜĞŞÇİ");

Avatar

Level 1

Thanks for your reply Raff.

Works Great. You will update the method.