uri(String, URI) — The URI from which to download keys.
retry_interval(Integer, nil)(defaults to: nil)— Override the retry interval in
seconds. This is the minimum time between retries of failed key
downloads.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# googleauth - Class Google::Auth::IDTokens::HttpKeySource (v1.15.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.15.0 (latest)](/ruby/docs/reference/googleauth/latest/Google-Auth-IDTokens-HttpKeySource)\n- [1.14.0](/ruby/docs/reference/googleauth/1.14.0/Google-Auth-IDTokens-HttpKeySource)\n- [1.13.1](/ruby/docs/reference/googleauth/1.13.1/Google-Auth-IDTokens-HttpKeySource)\n- [1.12.2](/ruby/docs/reference/googleauth/1.12.2/Google-Auth-IDTokens-HttpKeySource) \nReference documentation and code samples for the googleauth class Google::Auth::IDTokens::HttpKeySource.\n\nA base key source that downloads keys from a URI. Subclasses should\noverride [#interpret_json](/ruby/docs/reference/googleauth/latest/Google-Auth-IDTokens-HttpKeySource#Google__Auth__IDTokens__HttpKeySource_interpret_json_instance_ \"Google::Auth::IDTokens::HttpKeySource#interpret_json (method)\") to parse the response. \n\nInherits\n--------\n\n- Object\n\nMethods\n-------\n\n### #current_keys\n\n def current_keys() -\u003e Array\u003cKeyInfo\u003e\n\nReturn the current keys, without attempting to re-download. \n**Returns**\n\n- (Array\\\u003c[KeyInfo](./Google-Auth-IDTokens-KeyInfo)\\\u003e)\n\n### #initialize\n\n def initialize(uri, retry_interval: nil) -\u003e HttpKeySource\n\nCreate an HTTP key source. \n**Parameters**\n\n- **uri** (String, URI) --- The URI from which to download keys.\n- **retry_interval** (Integer, nil) *(defaults to: nil)* --- Override the retry interval in seconds. This is the minimum time between retries of failed key downloads. \n**Returns**\n\n- ([HttpKeySource](./Google-Auth-IDTokens-HttpKeySource)) --- a new instance of HttpKeySource\n\n### #refresh_keys\n\n def refresh_keys() -\u003e Array\u003cKeyInfo\u003e\n\nAttempt to re-download keys (if the retry interval has expired) and\nreturn the new keys. \n**Returns**\n\n- (Array\\\u003c[KeyInfo](./Google-Auth-IDTokens-KeyInfo)\\\u003e) \n**Raises**\n\n- ([Google::Auth::IDTokens::KeySourceError](./Google-Auth-IDTokens-KeySourceError)) --- If key retrieval fails, JSON parsing fails, or the data cannot be interpreted as keys\n\n### #uri\n\n def uri() -\u003e Array\u003cKeyInfo\u003e\n\nThe URI from which to download keys. \n**Returns**\n\n- (Array\\\u003c[KeyInfo](./Google-Auth-IDTokens-KeyInfo)\\\u003e)\n\nConstants\n---------\n\n### DEFAULT_RETRY_INTERVAL\n\n**value:** 3600 \nThe default interval between retries in seconds (3600s = 1hr)."]]