PHP Class SlackOAuthService

Inheritance: extends EOAuth2Service
Show file Open project: nodge/yii-eauth

Protected Properties

Property Type Description
$client_id
$client_secret
$errorAccessDeniedCode
$jsArguments
$name
$providerOptions
$scope
$team
$title
$type

Protected Methods

Method Description
fetchAttributes ( )
fetchJsonError ( stdClass $json ) : array Returns the error info from json.
getAccessToken ( $code )
getCodeUrl ( string $redirect_uri ) : string Returns the url to request to get OAuth2 code.
getSignedRequestFields ( ) : array Returns fields required for signed request.
initRequest ( string $url, array $options = [] ) : cURL Add User-Agent header

Method Details

fetchAttributes() protected method

protected fetchAttributes ( )

fetchJsonError() protected method

Returns the error info from json.
protected fetchJsonError ( stdClass $json ) : array
$json stdClass the json response.
return array the error array with 2 keys: code and message. Should be null if no errors.

getAccessToken() protected method

protected getAccessToken ( $code )

getCodeUrl() protected method

Returns the url to request to get OAuth2 code.
protected getCodeUrl ( string $redirect_uri ) : string
$redirect_uri string url to redirect after user confirmation.
return string url to request.

getSignedRequestFields() protected method

Used in {@link makeSignedRequest}.
protected getSignedRequestFields ( ) : array
return array

initRequest() protected method

Add User-Agent header
protected initRequest ( string $url, array $options = [] ) : cURL
$url string
$options array
return cURL

Property Details

$client_id protected property

protected $client_id

$client_secret protected property

protected $client_secret

$errorAccessDeniedCode protected property

protected $errorAccessDeniedCode

$jsArguments protected property

protected $jsArguments

$name protected property

protected $name

$providerOptions protected property

protected $providerOptions

$scope protected property

protected $scope

$team protected property

protected $team

$title protected property

protected $title

$type protected property

protected $type