Class: OCI::Signer
- Inherits:
-
BaseSigner
- Object
- BaseSigner
- OCI::Signer
- Defined in:
- lib/oci/signer.rb
Overview
Used to sign HTTP requests as required by Oracle Cloud Infrastructure.
Constant Summary collapse
- SIGNING_STRATEGY_ENUM =
enum to define the signing strategy
[STANDARD = 'standard'.freeze, OBJECT_STORAGE = 'object_storage'.freeze].freeze
Constants inherited from BaseSigner
BaseSigner::BODY_HEADERS, BaseSigner::GENERIC_HEADERS, BaseSigner::SIGNATURE_VERSION
Instance Method Summary collapse
-
#initialize(user, fingerprint, tenancy, private_key_file, pass_phrase: nil, private_key_content: nil, signing_strategy: STANDARD) ⇒ Signer
constructor
Creates a Signer.
Methods inherited from BaseSigner
Constructor Details
#initialize(user, fingerprint, tenancy, private_key_file, pass_phrase: nil, private_key_content: nil, signing_strategy: STANDARD) ⇒ Signer
Creates a Signer
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/oci/signer.rb', line 23 def initialize( user, fingerprint, tenancy, private_key_file, pass_phrase: nil, private_key_content: nil, signing_strategy: STANDARD ) raise 'Missing required parameter user.' unless user raise 'Missing required parameter fingerprint.' unless fingerprint raise 'Missing required parameter tenancy.' unless tenancy raise 'Missing required parameter private_key_file or private_key_content.' \ unless private_key_file || private_key_content private_key = private_key_content.nil? ? File.read(private_key_file) : private_key_content super("#{tenancy}/#{user}/#{fingerprint}", private_key, pass_phrase: pass_phrase, signing_strategy: signing_strategy) end |