Class: LetsCert::AccountKey
- Includes:
- FileIOPluginMixin, JWKIOPluginMixin
- Defined in:
- lib/letscert/io_plugins/account_key.rb
Overview
Account key IO plugin
Instance Attribute Summary
Attributes inherited from IOPlugin
Instance Method Summary collapse
- #load_from_content(content) ⇒ Hash
-
#persisted ⇒ Hash
Always get
true
for:account_key
key. -
#save(data) ⇒ void
Save account key.
Methods included from JWKIOPluginMixin
#dump_jwk, #load_jwk, #urlsafe_decode64, #urlsafe_encode64
Methods included from FileIOPluginMixin
Methods inherited from IOPlugin
empty_data, #initialize, #load, register
Methods included from Loggable
Constructor Details
This class inherits a constructor from LetsCert::IOPlugin
Instance Method Details
#load_from_content(content) ⇒ Hash
36 37 38 |
# File 'lib/letscert/io_plugins/account_key.rb', line 36 def load_from_content(content) { account_key: load_jwk(content) } end |
#persisted ⇒ Hash
Returns always get true
for :account_key
key.
31 32 33 |
# File 'lib/letscert/io_plugins/account_key.rb', line 31 def persisted { account_key: true } end |
#save(data) ⇒ void
This method returns an undefined value.
Save account key.
43 44 45 |
# File 'lib/letscert/io_plugins/account_key.rb', line 43 def save(data) save_to_file(dump_jwk(data[:account_key])) end |