Class: FirebaseTokenAuth::PublicKeyManager

Inherits:
Object
  • Object
show all
Defined in:
lib/firebase_token_auth/public_key_manager.rb

Constant Summary collapse

PUBLIC_KEY_URL =
'https://www.googleapis.com/robot/v1/metadata/x509/[email protected]'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePublicKeyManager

Returns a new instance of PublicKeyManager.



9
10
11
# File 'lib/firebase_token_auth/public_key_manager.rb', line 9

def initialize
  fetch_publickeys_hash
end

Instance Attribute Details

#expire_timeObject

Returns the value of attribute expire_time.



7
8
9
# File 'lib/firebase_token_auth/public_key_manager.rb', line 7

def expire_time
  @expire_time
end

#public_keysObject

Returns the value of attribute public_keys.



7
8
9
# File 'lib/firebase_token_auth/public_key_manager.rb', line 7

def public_keys
  @public_keys
end

Instance Method Details

#refresh_publickeys!Object



13
14
15
16
17
# File 'lib/firebase_token_auth/public_key_manager.rb', line 13

def refresh_publickeys!
  return unless expired?

  fetch_publickeys_hash
end