Google Cloud Ruby API Authorization / Client / Token handling -


i'm struggling bit google cloud ruby api in rails app , looking guidance. here's few questions , appreciated.

      key = google::apiclient::keyutils.load_from_pkcs12('file.p12', 'notasecret')   client = google::apiclient.new({:application_name => "app name", :application_version => "1.0"})   client.authorization = signet::oauth2::client.new(       :token_credential_uri => 'url',       :audience => 'audience',       :scope => 'scope',       :issuer => '',       :signing_key => key)   client.authorization.fetch_access_token! 
  1. probably important:

    "client.authorization.fetch_access_token!" 

    does need called every time? supposed saving off access token , using until expires or library take care of me?

  2. what for? works is, copied value example found online. should using differently?

    'notasecret' 
  3. :application_name , :application_version -- these used for? doc doesn't say. "the name of application using client." seemingly can send in here... http://www.rubydoc.info/github/google/google-api-ruby-client/google/apiclient

thanks help. it's bit frustrating lack of docs on authentication side of things ruby library google.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -