Reference documentation and code samples for the googleauth class Google::Auth::IDTokens::HttpKeySource.
A base key source that downloads keys from a URI. Subclasses should override #interpret_json to parse the response.
Inherits
- Object
Methods
#current_keys
def
current_keys
()
-
>
Array<KeyInfo>
Return the current keys, without attempting to re-download.
- (Array< KeyInfo >)
#initialize
def
initialize
(
uri
,
retry_interval
:
nil
)
-
>
HttpKeySource
Create an HTTP key source.
- 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.
- ( HttpKeySource ) — a new instance of HttpKeySource
#refresh_keys
def
refresh_keys
()
-
>
Array<KeyInfo>
Attempt to re-download keys (if the retry interval has expired) and return the new keys.
- (Array< KeyInfo >)
- ( KeySourceError ) — if key retrieval failed.
#uri
def
uri
()
-
>
Array<KeyInfo>
The URI from which to download keys.
- (Array< KeyInfo >)
Constants
DEFAULT_RETRY_INTERVAL
value:
3600
The default interval between retries in seconds (3600s = 1hr).