<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          Identity Toolkit PHP ClientPHP 客戶端庫(kù)

          聯(lián)合創(chuàng)作 · 2023-10-01 09:39

          Identity Toolkit PHP Client 是谷歌標(biāo)識(shí)工具包服務(wù)的 PHP 客戶端庫(kù)。

          示例代碼:

          require_once __DIR__ . '/vendor/autoload.php';
          $gitkitClient = Gitkit_Client::createFromFile("gitkit-server-config.json");
          // ---- upload account -----
          $hashKey = "\x01\x02\x03";
          $gitkitClient->uploadUsers('HMAC_SHA1', $hashKey, createNewUsers($hashKey));
          // --- verify gitkit token ----
          $user = 
          $gitkitClient->validateToken("eyJhb...");
          // ---- get account info by user identifier ----
          $user = $gitkitClient->getUserById("1234");
          // ---- get a url to send to user's email address to verify ownership -----
          $verificationLink = $gitkitClient->getEmailVerificationLink("[email protected]");
          // ---- download account ----$iterator = $gitkitClient->getAllUsers(3);
          while ($iterator->valid()) {  $user = $iterator->current();  
          // $user is a Gitkit_Account object  $iterator->next();}
          // ---- delete account ----
          $gitkitClient->deleteUser('1234');
          function createNewUsers($hashKey) {  
          $allUsers = array();  
          $gitkitUser = new Gitkit_Account();  
          $gitkitUser->setEmail("[email protected]");  
          $gitkitUser->setUserId("1234");  
          $salt = "\05\06\07";  
          $password = '1111';  
          $gitkitUser->setSalt($salt);  
          $gitkitUser->setPasswordHash(hash_hmac('sha1', $password . $salt, $hashKey, true));
          array_push($allUsers, $gitkitUser);  
          $gitkitUser = new Gitkit_Account();  
          $gitkitUser->setEmail('[email protected]');  
          $gitkitUser->setUserId('5678');  
          $salt = "\15\16\17";  
          $password = '5555';  
          $gitkitUser->setSalt($salt);  
          $gitkitUser->setPasswordHash(hash_hmac('sha1', $password . $salt, $hashKey, true));  
          array_push($allUsers, $gitkitUser);  return $allUsers;}

           

          瀏覽 20
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  亚洲精品无码激情AV在线观看 | 成人高清免费观看MV | 青青操国产手机在线视频 | 亚洲AV毛片在线观看。。 | 黄色永久免费 |