lib/lionel/google_authentication.rb in lionel_richie-0.1.3 vs lib/lionel/google_authentication.rb in lionel_richie-0.1.4

- old
+ new

@@ -1,10 +1,11 @@ module Lionel class GoogleAuthentication include Configurable - attr_reader :access_token + attr_accessor :access_token + attr_writer :client config_accessor :google_client_id, :google_client_secret def data raise "No access token" unless access_token { @@ -39,17 +40,17 @@ def api_console_url "https://code.google.com/apis/console" end - private - def client @client ||= OAuth2::Client.new(google_client_id, google_client_secret, :site => "https://accounts.google.com", :token_url => "/o/oauth2/token", :authorize_url => "/o/oauth2/auth") end + + private def refresh_token @refresh_token || configuration.google_refresh_token end