Class: Qiniu::RS::AccessToken
- Inherits:
-
Object
- Object
- Qiniu::RS::AccessToken
- Includes:
- Utils
- Defined in:
- lib/qiniu/tokens/access_token.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#access_key ⇒ Object
Returns the value of attribute access_key.
-
#secret_key ⇒ Object
Returns the value of attribute secret_key.
Instance Method Summary collapse
Methods included from Utils
#crc32checksum, #debug, #encode_entry_uri, #generate_qbox_signature, #generate_query_string, #http_request, #is_response_ok?, #response_error, #safe_json_parse, #send_request_with, #upload_multipart_data, #urlsafe_base64_decode, #urlsafe_base64_encode
Instance Attribute Details
#access_key ⇒ Object
Returns the value of attribute access_key.
13 14 15 |
# File 'lib/qiniu/tokens/access_token.rb', line 13 def access_key @access_key end |
#secret_key ⇒ Object
Returns the value of attribute secret_key.
13 14 15 |
# File 'lib/qiniu/tokens/access_token.rb', line 13 def secret_key @secret_key end |
Instance Method Details
#generate_encoded_digest(signature) ⇒ Object
15 16 17 18 19 |
# File 'lib/qiniu/tokens/access_token.rb', line 15 def generate_encoded_digest(signature) hmac = HMAC::SHA1.new(@secret_key) hmac.update(signature) urlsafe_base64_encode(hmac.digest) end |