Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(translate-v2): Ensure access token is fetched with recent googleauth versions in the non-api-key case #28096

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def sign_http_request! request
client = credentials.client
return if client.nil?

client.fetch_access_token! if client.expires_within? 30
client.fetch_access_token! if client.access_token.nil? || client.expires_within?(30)
client.generate_authenticated_request request: request
request
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ def expires_within? _
false
end

def access_token
:token
end

def generate_authenticated_request request:
end
end
Expand Down
Loading