| Package | com.yahoo.oauth |
| Class | public class OAuthRequest |
See also
| Property | Defined by | ||
|---|---|---|---|
| consumer : OAuthConsumer
The OAuth consumer.
| OAuthRequest | ||
| httpMethod : String
The HTTP request method used to send the request.
| OAuthRequest | ||
| requestParams : Object
An object containing key=value pairs used in the request and signing.
| OAuthRequest | ||
| requestURL : String
The URL of the resource.
| OAuthRequest | ||
| token : OAuthToken
The OAuth access token.
| OAuthRequest | ||
| useExplicitEncoding : Boolean = true
Determines if the request parameters in the signature base string should be encoded using
encodeURIComponent. | OAuthRequest | ||
| validRequestTypes : Array [read-only]
An array of the valid request types used to build and sign a request.
| OAuthRequest | ||
| Method | Defined by | ||
|---|---|---|---|
|
OAuthRequest(httpMethod:String, requestURL:String, requestParams:Object = null, consumer:OAuthConsumer = null, token:OAuthToken = null)
Class constructor.
| OAuthRequest | ||
|
buildRequest(signatureMethod:IOAuthSignatureMethod, requestType:String, realm:String = null):*
Builds and signs the request using the provided signature method and result type requested.
| OAuthRequest | ||
|
getNonOAuthParams():Object
Returns all non-OAuth parameters.
| OAuthRequest | ||
|
getOAuthParams():Object
Returns all OAuth parameters.
| OAuthRequest | ||
|
getSignableString():String
Builds a signable request string containing the http method, url and parameters.
| OAuthRequest | ||
| Constant | Defined by | ||
|---|---|---|---|
| OAUTH_REQUEST_TYPE_HEADER : String = "OAUTH_REQUEST_TYPE_HEADER" [static]
A string which is used in
buildRequest that the
returned data type should be an URLRequestHeader type, containing
an OAuth Authorization header. | OAuthRequest | ||
| OAUTH_REQUEST_TYPE_OBJECT : String = "OAUTH_REQUEST_TYPE_OBJECT" [static]
A string which is used in
buildRequest that the
returned data type should be an Object. | OAuthRequest | ||
| OAUTH_REQUEST_TYPE_POST : String = "OAUTH_REQUEST_TYPE_POST" [static]
A string which is used in
buildRequest that the
returned data type should be a string, usable as POST data. | OAuthRequest | ||
| OAUTH_REQUEST_TYPE_URL_STRING : String = "OAUTH_REQUEST_TYPE_URL_STRING" [static]
A string which is used in
buildRequest that the
returned data type should be a url encoded string. | OAuthRequest | ||
| OAUTH_REQUEST_TYPE_URL_VARIABLES : String = "OAUTH_REQUEST_TYPE_URL_VARIABLES" [static]
A string which is used in
buildRequest that the
returned data type should be an URLVariables object. | OAuthRequest | ||
| consumer | property |
consumer:OAuthConsumer [read-write]The OAuth consumer.
Implementation public function get consumer():OAuthConsumer
public function set consumer(value:OAuthConsumer):void
See also
| httpMethod | property |
httpMethod:String [read-write]The HTTP request method used to send the request. Value MUST be a member of URLRequestMethod
Implementation public function get httpMethod():String
public function set httpMethod(value:String):void
See also
| requestParams | property |
requestParams:Object [read-write]An object containing key=value pairs used in the request and signing. OAuth Protocol Parameter names and values are case sensitive. Each OAuth Protocol Parameters must not appear more than once per request, are required unless otherwise noted.
Implementation public function get requestParams():Object
public function set requestParams(value:Object):void
See also
| requestURL | property |
requestURL:String [read-write]
The URL of the resource.
The request URL MUST include scheme, authority, and path and must exclude the query string in
favor of the requestParams object.
public function get requestURL():String
public function set requestURL(value:String):void
See also
| token | property |
token:OAuthToken [read-write]The OAuth access token.
Implementation public function get token():OAuthToken
public function set token(value:OAuthToken):void
See also
| useExplicitEncoding | property |
public var useExplicitEncoding:Boolean = true
Determines if the request parameters in the signature base string should be encoded using encodeURIComponent.
| validRequestTypes | property |
validRequestTypes:Array [read-only]An array of the valid request types used to build and sign a request.
Implementation public function get validRequestTypes():Array
| OAuthRequest | () | constructor |
public function OAuthRequest(httpMethod:String, requestURL:String, requestParams:Object = null, consumer:OAuthConsumer = null, token:OAuthToken = null)Class constructor. Creates a new OAuthRequest object.
ParametershttpMethod:String — The HTTP request method used to send the request. The value MUST be a member of URLRequestMethod
|
|
requestURL:String — The URL of the request, it must include the protocol, host, port (optional) and path.
|
|
requestParams:Object (default = null) — An optional object containing the key=value pairs to be used in the request.
|
|
consumer:OAuthConsumer (default = null) — An optional OAuthConsumer object used to sign the request.
|
|
token:OAuthToken (default = null) — An optional OAuthToken object used to sign the request.
|
See also
| buildRequest | () | method |
public function buildRequest(signatureMethod:IOAuthSignatureMethod, requestType:String, realm:String = null):*Builds and signs the request using the provided signature method and result type requested.
ParameterssignatureMethod:IOAuthSignatureMethod — An object implemented with IOAuthSignature method. Typically OAuthSignatureMethod_PLAINTEXT or OAuthSignatureMethod_HMAC_SHA1.
|
|
requestType:String — A request type that determines what OAuth signature is returned.
|
|
realm:String (default = null) — A string which specifies a realm which will be used in the request header. Used only if the requestType equals OAUTH_REQUEST_TYPE_HEADER.
|
* — An object whose type is determined by the requestType.
|
— Throws an Error if the signature method or request type is invalid and the request cannot be signed.
|
See also
| getNonOAuthParams | () | method |
public function getNonOAuthParams():ObjectReturns all non-OAuth parameters.
ReturnsObject |
| getOAuthParams | () | method |
public function getOAuthParams():ObjectReturns all OAuth parameters.
ReturnsObject |
| getSignableString | () | method |
public function getSignableString():StringBuilds a signable request string containing the http method, url and parameters.
ReturnsString |
| OAUTH_REQUEST_TYPE_HEADER | constant |
public static const OAUTH_REQUEST_TYPE_HEADER:String = "OAUTH_REQUEST_TYPE_HEADER"
A string which is used in buildRequest that the
returned data type should be an URLRequestHeader type, containing
an OAuth Authorization header.
See also
| OAUTH_REQUEST_TYPE_OBJECT | constant |
public static const OAUTH_REQUEST_TYPE_OBJECT:String = "OAUTH_REQUEST_TYPE_OBJECT"
A string which is used in buildRequest that the
returned data type should be an Object.
| OAUTH_REQUEST_TYPE_POST | constant |
public static const OAUTH_REQUEST_TYPE_POST:String = "OAUTH_REQUEST_TYPE_POST"
A string which is used in buildRequest that the
returned data type should be a string, usable as POST data.
| OAUTH_REQUEST_TYPE_URL_STRING | constant |
public static const OAUTH_REQUEST_TYPE_URL_STRING:String = "OAUTH_REQUEST_TYPE_URL_STRING"
A string which is used in buildRequest that the
returned data type should be a url encoded string.
| OAUTH_REQUEST_TYPE_URL_VARIABLES | constant |
public static const OAUTH_REQUEST_TYPE_URL_VARIABLES:String = "OAUTH_REQUEST_TYPE_URL_VARIABLES"
A string which is used in buildRequest that the
returned data type should be an URLVariables object.