1.17.8 (latest) 1.17.7 1.16.2 1.15.1 1.14.0 1.13.1 1.12.2 Reference documentation and code samples for the googleauth class Google::Auth::IDTokens::StaticKeySource.

A key source that contains a static set of keys.

## Inherits

- Object

## Methods

### .from_jwk

```ruby
def self.from_jwk(jwk) -> StaticKeySource
```
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.
**Parameter**

- **jwk** (Hash, String) --- The JWK specification.
**Returns**

- ([StaticKeySource](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-IDTokens-StaticKeySource.md.txt))

### .from_jwk_set

```ruby
def self.from_jwk_set(jwk_set) -> StaticKeySource
```
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.
**Parameter**

- **jwk_set** (Hash, String) --- The JWK Set specification.
**Returns**

- ([StaticKeySource](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-IDTokens-StaticKeySource.md.txt))

### #current_keys

```ruby
def current_keys() -> Array<KeyInfo>
```
**Aliases**

- [#refresh_keys](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-IDTokens-StaticKeySource.md.txt#Google__Auth__IDTokens__StaticKeySource_refresh_keys_instance_)
Return the current keys. Does not perform any refresh.
**Returns**

- (Array\<[KeyInfo](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-IDTokens-KeyInfo.md.txt)\>)

### #initialize

```ruby
def initialize(keys) -> StaticKeySource
```
Create a static key source with the given keys.
**Parameter**

- **keys** (Array\<[KeyInfo](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-IDTokens-KeyInfo.md.txt)\>) --- The keys
**Returns**

- ([StaticKeySource](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-IDTokens-StaticKeySource.md.txt)) --- a new instance of StaticKeySource

### #refresh_keys

```ruby
def refresh_keys() -> Array<KeyInfo>
```
**Alias Of** : [#current_keys](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-IDTokens-StaticKeySource.md.txt#Google__Auth__IDTokens__StaticKeySource_current_keys_instance_) Return the current keys. Does not perform any refresh.
**Returns**

- (Array\<[KeyInfo](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-IDTokens-KeyInfo.md.txt)\>)