class Google::Auth::IDTokens::AggregateKeySource
A key source that aggregates other key sources. This means it will aggregate the keys provided by its constituent sources. Additionally, when asked to refresh, it will refresh all its constituent sources.
Public Class Methods
Source
# File lib/googleauth/id_tokens/key_sources.rb, line 357 def initialize sources @sources = Array(sources) end
Create a key source that aggregates other key sources.
@param sources [Array<key source>] The key sources to aggregate.
Public Instance Methods
Source
# File lib/googleauth/id_tokens/key_sources.rb, line 366 def current_keys @sources.flat_map(&:current_keys) end
Return the current keys, without attempting to refresh.
@return [Array<KeyInfo>]
Source
# File lib/googleauth/id_tokens/key_sources.rb, line 376 def refresh_keys @sources.flat_map(&:refresh_keys) end
Attempt to refresh keys and return the new keys.
@return [Array<KeyInfo>] @raise [KeySourceError] if key retrieval failed.