Class: OCI::Auth::Internal::AuthTokenRequestSigner

Inherits:
BaseSigner
  • Object
show all
Defined in:
lib/oci/auth/internal/auth_token_request_signer.rb

Overview

A signer which can sign requests to Auth Service. Not intended for general use

Constant Summary

Constants inherited from BaseSigner

BaseSigner::BODY_HEADERS, BaseSigner::GENERIC_HEADERS, BaseSigner::SIGNATURE_VERSION, BaseSigner::SIGNING_STRATEGY_ENUM

Instance Method Summary collapse

Methods inherited from BaseSigner

#sign

Constructor Details

#initialize(tenancy_id, fingerprint, private_key_pem) ⇒ AuthTokenRequestSigner

Returns a new instance of AuthTokenRequestSigner.



11
12
13
14
15
16
17
# File 'lib/oci/auth/internal/auth_token_request_signer.rb', line 11

def initialize(tenancy_id, fingerprint, private_key_pem)
  api_key = "#{tenancy_id}/fed-x509/#{fingerprint}"
  private_key = private_key_pem

  generic_headers = %i[date (request-target)]
  super(api_key, private_key, headers_to_sign_in_all_requests: generic_headers)
end