Class: Azure::ServiceBus::Auth::WrapSigner

Inherits:
Core::Auth::Signer show all
Defined in:
lib/azure/service_bus/auth/wrap_signer.rb

Instance Attribute Summary collapse

Attributes inherited from Core::Auth::Signer

#access_key

Instance Method Summary collapse

Constructor Details

#initializeWrapSigner

Returns a new instance of WrapSigner.



25
26
27
28
# File 'lib/azure/service_bus/auth/wrap_signer.rb', line 25

def initialize
  @tokens = {}
  @wrap_service = Azure::ServiceBus::Auth::WrapService.new
end

Instance Attribute Details

#tokensObject

Returns the value of attribute tokens.



30
31
32
# File 'lib/azure/service_bus/auth/wrap_signer.rb', line 30

def tokens
  @tokens
end

Instance Method Details

#nameObject



32
33
34
# File 'lib/azure/service_bus/auth/wrap_signer.rb', line 32

def name
  "WRAP"
end

#sign(method, uri, headers) ⇒ Object



37
38
39
40
# File 'lib/azure/service_bus/auth/wrap_signer.rb', line 37

def sign(method, uri, headers)
  access_token = get_access_token(create_scope_uri(uri))
  'access_token="%s"' % access_token
end