我正在使用(alpha)Ruby google-api-client
与我们组织的Google Apps实例的各种服务进行互动。
我想发现provisioning services API,使用服务帐户验证用户身份,并更新密码。
到目前为止......
require 'google/api_client'
class GoogleProvisioningConnection
def initialize(user_email=nil)
@client = Google::APIClient.new
@provisioning = @client.discovered_api('???', 'v2') # what's it called? user?
key_file_name = 'mykey-privatekey.p12'
key = Google::APIClient::PKCS12.load_key(key_file_name, 'notasecret')
asserter = Google::APIClient::JWTAsserter.new(
'...@developer.gserviceaccount.com',
'???', # which url allows me access to their user?
key)
@client.authorization = asserter.authorize(user_email)
end
end
与@client.discovered_api
一起使用哪个字符串来获取配置API?
当使用JWT断言器时,应该请求哪个服务URL?
感谢