Class: Amazon::Coral::HttpDelegationHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/amazon/coral/httpdelegationhelper.rb

Class Method Summary collapse

Class Method Details

.add_delegation_token(delegate_identity, request_identity) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/amazon/coral/httpdelegationhelper.rb', line 8

def self.add_delegation_token(delegate_identity, request_identity)
  token = ""
  first = true
  
  delegate_identity.each do |k,v|
    if(first)
      first = false
    else
      token << ';'
    end
    
    token << "#{k}=#{v}"
  end
  
  request_identity[:http_delegation] = token if(token.length > 0)
end