new $k.OAuth(consumerKey, accessToken)
Constructs an OAuth instance
| Name | Type | Description | 
|---|---|---|
consumerKey | 
            
            
            
                
                    
                        optional
                    
                    
                        
                    
                
                 Consumer key  | 
        |
accessToken | 
            
            
            
                
                    
                        optional
                    
                    
                        
                    
                
                 Access token  | 
        
- Version:
 - Experimental feature, might be removed at any time
 
- Since:
 - 4.0.3 OAuth 1.0 support
 
Methods
authenticateRequest(request)
Add OAuth authentication to the request
| Name | Type | Description | 
|---|---|---|
request | 
            
            
            $k.HttpRequest | 
- Version:
 - Experimental feature, might be removed at any time
 
- Since:
 - 4.0.3
 
obtainAccessToken(url, token, secret, verifier) : object
Obtain an access token
| Name | Type | Description | 
|---|---|---|
url | 
            
            
            string | 
                
                 Access token URL  | 
        
token | 
            
            
            string | 
                
                 Request token  | 
        
secret | 
            
            
            string | 
                
                 Request token secret  | 
        
verifier | 
            
            
            string | 
                
                 Verification code  | 
        
- Version:
 - Experimental feature, might be removed at any time
 
- Since:
 - 4.0.3
 
Returns:
| Type | Description | 
|---|---|
| object | OAuth access token information object | 
        
obtainRequestToken(url) : object
Obtain a request token
| Name | Type | Description | 
|---|---|---|
url | 
            
            
            string | 
                
                 Request token URL  | 
        
- Version:
 - Experimental feature, might be removed at any time
 
- Since:
 - 4.0.3
 
Returns:
| Type | Description | 
|---|---|
| object | OAuth token information object | 
        
setAccessToken(token)
Set the access token
| Name | Type | Description | 
|---|---|---|
token | 
            
            
            string | 
- Version:
 - Experimental feature, might be removed at any time
 
- Since:
 - 4.0.3
 
setCallback(url)
Set the callback URL. If not set, "oob" is used
| Name | Type | Description | 
|---|---|---|
url | 
            
            
            string | 
- Version:
 - Experimental feature, might be removed at any time
 
- Since:
 - 4.0.3
 
setConsumerKey(key)
Set the consumer key
| Name | Type | Description | 
|---|---|---|
key | 
            
            
            string | 
- Version:
 - Experimental feature, might be removed at any time
 
- Since:
 - 4.0.3
 
setPrivateKey(secret)
Set the private RSA key
| Name | Type | Description | 
|---|---|---|
secret | 
            
            
            string | 
- Version:
 - Experimental feature, might be removed at any time
 
- Since:
 - 4.0.3