include/SugarOauth.php

Show: inherited
Table of Contents

\SugarOAuth

Package: SugarCRM

Sugar Oauth consumer

Parent(s)
\Zend_Oauth_Consumer
Api
 

Properties

Propertyprotected  $_last= ''''
Default value''Details
Type
n/a
Propertyprotected  $_oauth_config= 'array()'
Default valuearray()Details
Type
n/a

Methods

methodpublic__construct( string $consumer_key, string $consumer_secret, array $params = null ) : void

Create OAuth client

Parameters
Name Type Description
$consumer_key string
$consumer_secret string
$params array

OAuth options

methodpublicenableDebug( ) : \SugarOAuth

Enable debugging

Returns
Type Description
\SugarOAuth
methodpublicfetch( string $url, string $params = null, string $method = 'GET', array $headers = null ) : string

Fetch URL with OAuth

Parameters
Name Type Description
$url string
$params string

Query params

$method string

HTTP method

$headers array

HTTP headers

Returns
Type Description
string
methodpublicgetAccessToken( string $url ) : array

Retrieve access token from url

Parameters
Name Type Description
$url string
Returns
Type Description
array
Details
See
\Zend_Oauth_Consumer::getAccessToken()  
methodpublicgetClient( ) : \Zend_Oauth_Client

Get HTTP client

Returns
Type Description
\Zend_Oauth_Client
methodpublicgetLastRequest( ) : string

Get last request

Returns
Type Description
string
methodpublicgetLastResponse( ) : string

Get last response

Returns
Type Description
string
methodpublicgetRequestToken( string $url, string $callback = null, array $params = array() ) : array

Retrieve request token from URL

Parameters
Name Type Description
$url string
$callback string

Callback URL

$params array

Query params

Returns
Type Description
array
Details
See
\Zend_Oauth_Consumer::getRequestToken()  
methodpublicmakeAccessToken( ) : \Zend_Oauth_Token_Access

Create access token object for current token

Returns
Type Description
\Zend_Oauth_Token_Access
methodpublicmakeRequestToken( ) : \Zend_Oauth_Token_Request

Create request token object for current token

Returns
Type Description
\Zend_Oauth_Token_Request
methodpublicsetToken( string $token, string $secret ) : void

Set token

Parameters
Name Type Description
$token string
$secret string
Documentation was generated by DocBlox 0.18.1.