Class: Verizon::VzM2mToken

Inherits:
CoreLibrary::HeaderAuth
  • Object
show all
Defined in:
lib/verizon/http/auth/vz_m2m_token.rb

Overview

Utility class for custom header authorization.

Instance Method Summary collapse

Constructor Details

#initialize(vz_m2m_token_credentials) ⇒ VzM2mToken

Initialization constructor.



16
17
18
19
20
21
22
# File 'lib/verizon/http/auth/vz_m2m_token.rb', line 16

def initialize(vz_m2m_token_credentials)
  auth_params = {}
  auth_params['VZ-M2M-Token'] = vz_m2m_token_credentials.vz_m2m_token unless
    vz_m2m_token_credentials.nil? || vz_m2m_token_credentials.vz_m2m_token.nil?

  super auth_params
end

Instance Method Details

#error_messageObject

Display error message on occurrence of authentication failure.



11
12
13
# File 'lib/verizon/http/auth/vz_m2m_token.rb', line 11

def error_message
  'VZM2MToken: vz_m2m_token is undefined.'
end