0

저는 (알파) Ruby google-api-client을 사용하여 Google 조직의 Google Apps 인스턴스에 대한 다양한 서비스와 상호 작용합니다.Google의 프로비저닝 API를 어떻게 "발견"합니까?

provisioning services API를 찾고 서비스 계정으로 사용자를 인증하고 암호를 업데이트하고 싶습니다.

지금까지 ... 프로비저닝 API에서 얻을 @client.discovered_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을 요청해야합니까?
감사합니다.

+0

아마 이것에 대해 더 좋은 방법이 있습니다. "서비스 계정"이 없다면? – tbeseda

답변

5

Provisioning API은 이전 gdata 프로토콜을 사용합니다. 새로운 발견 기반 라이브러리에서는 작동하지 않습니다.

the GData Ruby Library을 사용해야합니다.