Class: MasterCard::Security::OAuth::OAuthParameters

Inherits:
Object
  • Object
show all
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

Constructor Details

#initializeOAuthParameters

Returns a new instance of OAuthParameters.



164
165
166
# File 'lib/mastercard/security/oauth.rb', line 164

def initialize
  @baseParameters = Hash.new
end

Instance Method Details

#getBaseParametersHashObject



200
201
202
# File 'lib/mastercard/security/oauth.rb', line 200

def getBaseParametersHash
  return @baseParameters
end

#put(key, value) ⇒ Object



168
169
170
# File 'lib/mastercard/security/oauth.rb', line 168

def put(key,value)
  @baseParameters[key] = value
end

#setOAuthBodyHash(bodyHash) ⇒ Object



192
193
194
# File 'lib/mastercard/security/oauth.rb', line 192

def setOAuthBodyHash(bodyHash)
  put(OAuthParameters::OAUTH_BODY_HASH_KEY, bodyHash)
end

#setOAuthConsumerKey(consumerKey) ⇒ Object



172
173
174
# File 'lib/mastercard/security/oauth.rb', line 172

def setOAuthConsumerKey(consumerKey)
  put(OAuthParameters::OAUTH_CONSUMER_KEY, consumerKey)
end

#setOAuthNonce(oAuthNonce) ⇒ Object



176
177
178
# File 'lib/mastercard/security/oauth.rb', line 176

def setOAuthNonce(oAuthNonce)
  put(OAuthParameters::OAUTH_NONCE_KEY, oAuthNonce)
end

#setOAuthSignature(signature) ⇒ Object



188
189
190
# File 'lib/mastercard/security/oauth.rb', line 188

def setOAuthSignature(signature)
  put(OAuthParameters::OAUTH_SIGNATURE_KEY, signature)
end

#setOAuthSignatureMethod(signatureMethod) ⇒ Object



184
185
186
# File 'lib/mastercard/security/oauth.rb', line 184

def setOAuthSignatureMethod(signatureMethod)
  put(OAuthParameters::OAUTH_SIGNATURE_METHOD_KEY, signatureMethod)
end

#setOAuthTimestamp(timestamp) ⇒ Object



180
181
182
# File 'lib/mastercard/security/oauth.rb', line 180

def setOAuthTimestamp(timestamp)
  put(OAuthParameters::OAUTH_TIMESTAMP_KEY, timestamp)
end

#setOAuthVersion(version) ⇒ Object



196
197
198
# File 'lib/mastercard/security/oauth.rb', line 196

def setOAuthVersion(version)
  put(OAuthParameters::OAUTH_VERSION, version)
end