Class: Vonage::NetworkAuthentication
Defined Under Namespace
Classes: ClientAuthentication, ServerAuthentication
Instance Method Summary
collapse
#initialize
Instance Method Details
#client_authentication ⇒ Object
14
15
16
|
# File 'lib/vonage/network_authentication.rb', line 14
def client_authentication
@client_authentication ||= ClientAuthentication.new(@config)
end
|
#server_authentication ⇒ Object
18
19
20
|
# File 'lib/vonage/network_authentication.rb', line 18
def server_authentication
@server_authentication ||= ServerAuthentication.new(@config)
end
|
#update(object, data) ⇒ Object
6
7
8
9
10
11
12
|
# File 'lib/vonage/network_authentication.rb', line 6
def update(object, data)
return unless object.is_a?(Net::HTTPRequest)
token = self.public_send(data[:auth_flow]).token(**data)
object['Authorization'] = 'Bearer ' + token
end
|