Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Access token expiration time included in constructor of OAuth2Client

  • Loading branch information...
commit 0b091c689fd784cf4fadc7154e91502d93a4dbd1 1 parent 284a6d9
@kfigiela kfigiela authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/youtube_it/client.rb
View
3  lib/youtube_it/client.rb
@@ -411,6 +411,7 @@ def initialize(options)
@client_secret = options[:client_secret]
@client_access_token = options[:client_access_token]
@client_refresh_token = options[:client_refresh_token]
+ @client_token_expires_at = options[:client_token_expires_at]
@dev_key = options[:dev_key]
end
@@ -422,7 +423,7 @@ def oauth_client
end
def access_token
- @access_token ||= ::OAuth2::AccessToken.new(oauth_client, @client_access_token, :refresh_token => @client_refresh_token)
+ @access_token ||= ::OAuth2::AccessToken.new(oauth_client, @client_access_token, :refresh_token => @client_refresh_token, :expires_at => @client_token_expires_at)
end
def refresh_access_token!
Please sign in to comment.
Something went wrong with that request. Please try again.