Sha256: 40404fdc459409538af887852a8e857ba38fdb1a5de49a7c394418888faf858b

Contents?: true

Size: 594 Bytes

Versions: 1

Compression:

Stored size: 594 Bytes

Contents

module LetsCert

  # Account key IO plugin
  # @author Sylvain Daubert
  class AccountKey < IOPlugin
    include FileIOPluginMixin
    include JWKIOPluginMixin

    # @return [Hash] always get +true+ for +:account_key+ key
    def persisted
      { account_key: true }
    end

    # @return [Hash]
    def load_from_content(content)
      { account_key: load_jwk(content) }
    end

    # Save account key.
    # @param [Hash] data
    # @return [void]
    def save(data)
      save_to_file(dump_jwk(data[:account_key]))
    end

  end

  IOPlugin.register(AccountKey, 'account_key.json')
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
letscert-0.4.2 lib/letscert/io_plugins/account_key.rb