当前位置: 首页 > 软件库 > 开发工具 > PHP开发工具 >

Identity Toolkit PHP Client

PHP 客户端库
授权协议 Apache
开发语言 PHP
所属分类 开发工具、 PHP开发工具
软件类型 开源软件
地区 不详
投 递 者 万博涛
操作系统 跨平台
开源组织 Google
适用人群 未知
 软件概览

Identity Toolkit PHP Client 是谷歌标识工具包服务的 PHP 客户端库。

示例代码:

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("1234@example.com");
// ---- 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("1234@example.com");  
$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('5678@example.com');  
$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;}

 

 相关资料
  • 我想在一些计算机之间建立点对点连接,这样用户就可以在没有外部服务器的情况下聊天和交换文件。我最初的想法如下: 我在服务器上制作了一个中央服务器插座,所有应用程序都可以连接到该插座。此ServerSocket跟踪已连接的套接字(客户端),并将新连接的客户端的IP和端口提供给所有其他客户端。每个客户端都会创建一个新的ServerSocket,所有客户端都可以连接到它。 换句话说:每个客户端都有一个Se

  • URI 方法 URI() string 返回当前客户端使用的服务器地址。 SetURI 方法 SetURI(uri string) 设置当前客户端使用的服务器地址。如果你想要设置多个服务器地址,请使用 SetURIList 方法代替该方法。 URIList 方法 URIList() []string 返回当前客户端可使用的服务器地址列表。 SetURIList 方法 SetURIList(uriL

  • 客户端事件通过 SetEvent 方法进行设置。 客户端事件有两个,它们分别定义为: type onErrorEvent interface { OnError(name string, err error) }   type onFailswitchEvent interface { OnFailswitch(Client) } 因为 go 语言不需要显式实现接口的特点,所以这两

  • 创建客户端有两种方式,一种是直接使用特化的构造器函数,另一种是使用工厂构造器函数。 第一种方式返回的是具体的客户端结构体指针对象,第二种方式返回的是客户端接口对象。 使用特化的构造器函数创建客户端 特化的构造器函数有下面几个: func NewHTTPClient(uri ...string) (client *HTTPClient) func NewTCPClient(uri ...string

  • 客户端下载地址: windows 32位安装包 windows 64位安裝包 mac 安装包 Android App iOS App

  • 问题 你想使用网络上提供的服务。 解决方案 创建一个基本的 TCP 客户机。 在 Node.js 中 net = require 'net' domain = 'localhost' port = 9001 connection = net.createConnection port, domain connection.on 'connect', () -> console.log

  • 客户端调用服务端 服务端的proto文件copy到客户端 获取grpc客户端 //sample 为服务名称 var client = await provider.FindGrpcClient<RpcTest.RpcTestClient>("sample"); 调用服务方法 var result = await client.SayHelloAsync(new HelloRequest() {

  • Disque 在源码中附带了命令行客户端程序 disque , 通过这个程序可以以交互的形式向 Disque 发送命令: $ ./disque 127.0.0.1:7711> PING PONG 另外你也可以使用以下编程语言的客户端来操作 Disque : Ruby 客户端 https://rubygems.org/gems/disque Java 客户端 https://github.com/x