class Google::Auth::IDTokens::StaticKeySource
A key source that contains a static set of keys.
Attributes
current_keys[R]
Return the current keys. Does not perform any refresh.
@return [Array<KeyInfo>]
refresh_keys[R]
Return the current keys. Does not perform any refresh.
@return [Array<KeyInfo>]
Public Class Methods
from_jwk(jwk)
click to toggle source
Create a static key source containing a single key parsed from a single JWK, which may be given as either a hash or an unparsed JSON string.
@param jwk [Hash,String] The JWK specification. @return [StaticKeySource]
# File lib/googleauth/id_tokens/key_sources.rb, line 201 def from_jwk jwk new KeyInfo.from_jwk jwk end
from_jwk_set(jwk_set)
click to toggle source
Create a static key source containing multiple keys parsed from a JWK Set, which may be given as either a hash or an unparsed JSON string.
@param jwk_set [Hash,String] The JWK Set specification. @return [StaticKeySource]
# File lib/googleauth/id_tokens/key_sources.rb, line 213 def from_jwk_set jwk_set new KeyInfo.from_jwk_set jwk_set end
new(keys)
click to toggle source
Create a static key source with the given keys.
@param keys [Array<KeyInfo>] The keys
# File lib/googleauth/id_tokens/key_sources.rb, line 180 def initialize keys @current_keys = Array(keys) end