Class: Aliyun::OSS::Authentication::Signature

Inherits:
String show all
Defined in:
lib/aliyun/oss/authentication.rb

Overview

Signature is the abstract super class for the Header and QueryString authentication methods. It does the job of computing the canonical_string using the CanonicalString class as well as encoding the canonical string. The subclasses parameterize these computations and arrange them in a string form appropriate to how they are used, in one case a http request header value, and in the other case key/value query string parameter pairs.

Direct Known Subclasses

Header, QueryString

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from String

#previous, #previous!, #remove_extended, #remove_extended!, #tap, #to_header, #underscore, #valid_utf8?

Constructor Details

#initialize(request, access_key_id, secret_access_key, options = {}) ⇒ Signature

Returns a new instance of Signature.



56
57
58
59
60
# File 'lib/aliyun/oss/authentication.rb', line 56

def initialize(request, access_key_id, secret_access_key, options = {})
  super()
  @request, @access_key_id, @secret_access_key = request, access_key_id, secret_access_key
  @options = options
end

Instance Attribute Details

#access_key_idObject (readonly)

:nodoc:



54
55
56
# File 'lib/aliyun/oss/authentication.rb', line 54

def access_key_id
  @access_key_id
end

#optionsObject (readonly)

:nodoc:



54
55
56
# File 'lib/aliyun/oss/authentication.rb', line 54

def options
  @options
end

#requestObject (readonly)

:nodoc:



54
55
56
# File 'lib/aliyun/oss/authentication.rb', line 54

def request
  @request
end

#secret_access_keyObject (readonly)

:nodoc:



54
55
56
# File 'lib/aliyun/oss/authentication.rb', line 54

def secret_access_key
  @secret_access_key
end