Class: OCI::Auth::Signers::RptPathProvider::EnvRptPathProvider

Inherits:
RptPathProvider
  • Object
show all
Defined in:
lib/oci/auth/signers/resource_principal_token_path_provider/env_rpt_path_provider.rb

Overview

env rpt path provider

Instance Method Summary collapse

Methods inherited from RptPathProvider

#token_path

Constructor Details

#initializeEnvRptPathProvider

Returns a new instance of EnvRptPathProvider.



10
11
12
13
14
15
16
# File 'lib/oci/auth/signers/resource_principal_token_path_provider/env_rpt_path_provider.rb', line 10

def initialize
  raise 'Unable to get OCI_RESOURCE_PRINCIPAL_RPT_ID from env var' if ENV[OCI_RESOURCE_PRINCIPAL_RPT_ID].nil?
  raise 'Unable to get OCI_RESOURCE_PRINCIPAL_RPT_PATH from env var' if ENV[OCI_RESOURCE_PRINCIPAL_RPT_PATH].nil?

  @rpt_id = ENV[OCI_RESOURCE_PRINCIPAL_RPT_ID]
  super(ENV[OCI_RESOURCE_PRINCIPAL_RPT_PATH])
end

Instance Method Details

#replacement_dictObject



18
19
20
# File 'lib/oci/auth/signers/resource_principal_token_path_provider/env_rpt_path_provider.rb', line 18

def replacement_dict
  { 'id' => @rpt_id }
end