identity-toolkit-ruby-clientRuby 上的 Google Identity Toolkit 客户端
identity-toolkit-ruby-client 是 Ruby 上的 Google Identity Toolkit 客户端的开发包。
示例:
require 'gitkit_client' # Create a server config file or download it from Google Developer Console # The config file contains Gitkit library config in json format # { # "clientId" : "oauth2-web-client-id.apps.googleusercontent.com", # "serviceAccountEmail" : "service-account-email@developer.gserviceaccount.com", # "serviceAccountPrivateKeyFile" : "path-to-service-account-private-key-file.p12", # "widgetUrl" : "full-url-of-gitkit-widget-on-your-site", # "cookieName" : "gtoken", # "serverKey" : "devconsole-server-key" # } # Create a Gitkit client gitkit_client = GitkitLib::GitkitClient.create_from_config_file 'gitkit-server-config.json' # Verify the Gitkit token in the incoming http request token = request.cookies["gtoken"] user = gitkit_client.verify_gitkit_token token # Upload passwords def calc_sha1(key, plain_text, salt) hmac = OpenSSL::HMAC.new key, 'sha1' hmac << plain_text hmac << salt hmac.digest end hash_key = 'hash-key' user1 = GitkitLib::GitkitUser.new user1.email = '1234@example.com' user1.user_id = '1234' user1.salt = 'salt-1' user1.password_hash = calc_sha1(hash_key, '1111', 'salt-1') user2 = GitkitLib::GitkitUser.new user2.email = '5678@example.com' user2.user_id = '5678' user2.salt = 'salt-2' user2.password_hash = calc_sha1(hash_key, '5555', 'salt-2') user2.name = '56 78' gitkit_client.upload_users 'HMAC_SHA1', hash_key, [user1, user2] # Get user by email user = gitkit_client.get_user_by_email('1234@example.com') # Get user by id user = gitkit_client.get_user_by_id('5678') # Delete a user gitkit_client.delete_user '5678' # Download all accounts gitkit_client.get_all_users(2) { |account| pp account}
评论
identity-toolkit-ruby-clientRuby 上的 Google Identity Toolkit 客户端
identity-toolkit-ruby-client是Ruby上的 GoogleIdentityToolkit客户端的开发包。示例:require 'gitkit_client'# Create
identity-toolkit-ruby-clientRuby 上的 Google Identity Toolkit 客户端
0
identity-toolkit-python-clientPython 上的 Google Identity Toolkit 客户端
identity-toolkit-python-client 是 Python 上的 Google
identity-toolkit-python-clientPython 上的 Google Identity Toolkit 客户端
0
identity-toolkit-node-clientNode.js 上的 Google Identity Toolkit 客户端
identity-toolkit-node-client是 Node.js上的 GoogleIdentityToolkit客户端的开发包。可用于初始化 Gitkit客户端;验证Gitkit令牌字符串;
identity-toolkit-node-clientNode.js 上的 Google Identity Toolkit 客户端
0
identity-toolkit-python-clientPython 上的 Google Identity Toolkit 客户端
identity-toolkit-python-client 是 Python上的 GoogleIdentityToolkit客户端库。
identity-toolkit-python-clientPython 上的 Google Identity Toolkit 客户端
0
identity-toolkit-node-clientNode.js 上的 Google Identity Toolkit 客户端
identity-toolkit-node-client 是 Node.js 上的 Google I
identity-toolkit-node-clientNode.js 上的 Google Identity Toolkit 客户端
0
Identity Toolkit PHP ClientPHP 客户端库
Identity Toolkit PHP Client 是谷歌标识工具包服务的 PHP 客户端库。示
Identity Toolkit PHP ClientPHP 客户端库
0
Identity Toolkit PHP ClientPHP 客户端库
IdentityToolkitPHPClient是谷歌标识工具包服务的PHP客户端库。示例代码:require_once __DIR__ . '/vendor/autoload.php';$gitki
Identity Toolkit PHP ClientPHP 客户端库
0
identity-toolkit-java-clientGoogle Identity Toolkit 服务的Java 客户端库
GoogleIdentityToolkitclientlibraryforJava是GoogleIdentityToolkit服务的Java客户端库。
identity-toolkit-java-clientGoogle Identity Toolkit 服务的Java 客户端库
0