コード例 #1
0
 public function testAuthenticator()
 {
     $Mock = new Authenticator(new Get());
     $this->assertInstanceOf('SPHERE\\System\\Authenticator\\ITypeInterface', $Mock->getAuthenticator());
     $Mock = new Authenticator(new Post());
     $this->assertInstanceOf('SPHERE\\System\\Authenticator\\ITypeInterface', $Mock->getAuthenticator());
 }
コード例 #2
0
 /**
  * @param null $Id
  *
  * @return string
  */
 public function ShowFile($Id = null)
 {
     $Auth = new Authenticator(new Get());
     $Query = http_build_query($Auth->getAuthenticator()->createSignature(array('Id' => $Id), '/Api/Test/ShowContent'));
     return '<iframe id="File-' . $Id . '" style="display: block" src="/Api/Test/ShowContent?' . $Query . '"></iframe>';
 }