class OCI::Auth::Signers::EphemeralRPSessionKeySupplier

EphemeralRPSessionKeySupplier for containing key info

Attributes

session_key[RW]

Public Class Methods

new(private_key, private_key_passphrase) click to toggle source
# File lib/oci/auth/signers/ephemeral_resource_principals_signer.rb, line 113
def initialize(private_key, private_key_passphrase)
  raise 'Missing Resource Principal Private Key' if private_key.nil?

  @private_key = private_key
  @private_key_passphrase = private_key_passphrase
  refresh
end

Public Instance Methods

refresh() click to toggle source
# File lib/oci/auth/signers/ephemeral_resource_principals_signer.rb, line 121
def refresh
  @session_key = if File.exist?(File.expand_path(@private_key))
                   OCI::Auth::Util.load_private_key_from_file(File.expand_path(@private_key), @private_key_passphrase)
                 else
                   OCI::Auth::Util.load_private_key(@private_key, @private_key_passphrase)
                 end
end