Class: MasterCard::Security::OAuth::OAuthParameters
- Inherits:
-
Object
- Object
- MasterCard::Security::OAuth::OAuthParameters
- Defined in:
- lib/mastercard/security/oauth.rb
Constant Summary collapse
- OAUTH_BODY_HASH_KEY =
"oauth_body_hash"
- OAUTH_CALLBACK_KEY =
"oauth_callback"
- OAUTH_CONSUMER_KEY =
"oauth_consumer_key"
- OAUTH_CONSUMER_SECRET =
"oauth_consumer_secret"
- OAUTH_NONCE_KEY =
"oauth_nonce"
- OAUTH_KEY =
"OAuth"
- AUTHORIZATION =
"Authorization"
- OAUTH_SIGNATURE_KEY =
"oauth_signature"
- OAUTH_SIGNATURE_METHOD_KEY =
"oauth_signature_method"
- OAUTH_TIMESTAMP_KEY =
"oauth_timestamp"
- OAUTH_TOKEN_KEY =
"oauth_token"
- OAUTH_TOKEN_SECRET_KEY =
"oauth_token_secret"
- OAUTH_VERIFIER_KEY =
"oauth_verifier"
- REALM_KEY =
"realm"
- XOAUTH_REQUESTOR_ID_KEY =
"xoauth_requestor_id"
- OAUTH_VERSION =
"oauth_version"
Instance Method Summary collapse
- #getBaseParametersHash ⇒ Object
-
#initialize ⇒ OAuthParameters
constructor
A new instance of OAuthParameters.
- #put(key, value) ⇒ Object
- #setOAuthBodyHash(bodyHash) ⇒ Object
- #setOAuthConsumerKey(consumerKey) ⇒ Object
- #setOAuthNonce(oAuthNonce) ⇒ Object
- #setOAuthSignature(signature) ⇒ Object
- #setOAuthSignatureMethod(signatureMethod) ⇒ Object
- #setOAuthTimestamp(timestamp) ⇒ Object
- #setOAuthVersion(version) ⇒ Object
Constructor Details
#initialize ⇒ OAuthParameters
Returns a new instance of OAuthParameters.
157 158 159 |
# File 'lib/mastercard/security/oauth.rb', line 157 def initialize @baseParameters = Hash.new end |
Instance Method Details
#getBaseParametersHash ⇒ Object
193 194 195 |
# File 'lib/mastercard/security/oauth.rb', line 193 def getBaseParametersHash return @baseParameters end |
#put(key, value) ⇒ Object
161 162 163 |
# File 'lib/mastercard/security/oauth.rb', line 161 def put(key,value) @baseParameters[key] = value end |
#setOAuthBodyHash(bodyHash) ⇒ Object
185 186 187 |
# File 'lib/mastercard/security/oauth.rb', line 185 def setOAuthBodyHash(bodyHash) put(OAuthParameters::OAUTH_BODY_HASH_KEY, bodyHash) end |
#setOAuthConsumerKey(consumerKey) ⇒ Object
165 166 167 |
# File 'lib/mastercard/security/oauth.rb', line 165 def setOAuthConsumerKey(consumerKey) put(OAuthParameters::OAUTH_CONSUMER_KEY, consumerKey) end |
#setOAuthNonce(oAuthNonce) ⇒ Object
169 170 171 |
# File 'lib/mastercard/security/oauth.rb', line 169 def setOAuthNonce(oAuthNonce) put(OAuthParameters::OAUTH_NONCE_KEY, oAuthNonce) end |
#setOAuthSignature(signature) ⇒ Object
181 182 183 |
# File 'lib/mastercard/security/oauth.rb', line 181 def setOAuthSignature(signature) put(OAuthParameters::OAUTH_SIGNATURE_KEY, signature) end |
#setOAuthSignatureMethod(signatureMethod) ⇒ Object
177 178 179 |
# File 'lib/mastercard/security/oauth.rb', line 177 def setOAuthSignatureMethod(signatureMethod) put(OAuthParameters::OAUTH_SIGNATURE_METHOD_KEY, signatureMethod) end |
#setOAuthTimestamp(timestamp) ⇒ Object
173 174 175 |
# File 'lib/mastercard/security/oauth.rb', line 173 def setOAuthTimestamp() put(OAuthParameters::OAUTH_TIMESTAMP_KEY, ) end |
#setOAuthVersion(version) ⇒ Object
189 190 191 |
# File 'lib/mastercard/security/oauth.rb', line 189 def setOAuthVersion(version) put(OAuthParameters::OAUTH_VERSION, version) end |