0
我使用(alpha)Ruby google-api-client
與我們組織的Google Apps實例的各種服務進行交互。如何「發現」Google的Provisioning API?
我想發現provisioning services API,使用服務帳戶驗證用戶並更新密碼。
到目前爲止...
哪個字符串使用@client.discovered_api
獲得在配置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(
'[email protected]',
'???', # which url allows me access to their user?
key)
@client.authorization = asserter.authorize(user_email)
end
end
?
當使用JWT斷言器時,應該請求哪個服務url?
謝謝
也許有更好的方法去做這件事。沒有「服務帳戶」? – tbeseda