Public Member Functions | |
authenticate () | |
makeSignedRequest ($url, $options=array(), $parseJson=true) | |
![]() | |
__get ($name) | |
__isset ($name) | |
init ($component, $options=array()) | |
getServiceName () | |
getServiceTitle () | |
getServiceType () | |
getJsArguments () | |
setComponent ($component) | |
getComponent () | |
setRedirectUrl ($url) | |
getRedirectUrl () | |
setCancelUrl ($url) | |
getCancelUrl () | |
getIsAuthenticated () | |
redirect ($url=null) | |
cancel ($url=null) | |
getId () | |
getAttributes () | |
getAttribute ($key, $default=null) | |
hasAttribute ($key) | |
getItem () | |
getItemAttributes () | |
![]() | |
cancel () |
Protected Member Functions | |
getCodeUrl ($redirect_uri) | |
getTokenUrl ($code) | |
getAccessToken ($code) | |
saveAccessToken ($token) | |
restoreAccessToken () | |
![]() | |
makeRequest ($url, $options=array(), $parseJson=true) | |
initRequest ($url, $options=array()) | |
parseJson ($response) | |
fetchJsonError ($json) | |
getStateKeyPrefix () | |
setState ($key, $value, $defaultValue=null) | |
hasState ($key) | |
getState ($key, $defaultValue=null) | |
fetchAttributes () | |
_fetchAttributes () |
Protected Attributes | |
$client_id | |
$client_secret | |
$scope = '' | |
$providerOptions | |
$access_token = '' | |
![]() | |
$name | |
$title | |
$type | |
$jsArguments = array() | |
$attributes = array() | |
$authenticated = false |
Definition at line 16 of file EOAuth2Service.php.
EOAuth2Service::authenticate | ( | ) |
Authenticate the user.
Reimplemented from EAuthServiceBase.
Definition at line 51 of file EOAuth2Service.php.
References IAuthService\cancel(), getAccessToken(), getCodeUrl(), EAuthServiceBase\getIsAuthenticated(), restoreAccessToken(), and saveAccessToken().
|
protected |
Returns the OAuth2 access token.
string | $code | the OAuth2 code. See getCodeUrl. |
Reimplemented in GoogleOAuthService, MailruOAuthService, FacebookOAuthService, OdnoklassnikiOAuthService, and MoikrugOAuthService.
Definition at line 107 of file EOAuth2Service.php.
References getTokenUrl(), and EAuthServiceBase\makeRequest().
Referenced by authenticate().
|
protected |
Returns the url to request to get OAuth2 code.
string | $redirect_uri | url to redirect after user confirmation. |
Reimplemented in VKontakteOAuthService, OdnoklassnikiOAuthService, GoogleOAuthService, MailruOAuthService, MoikrugOAuthService, and FacebookOAuthService.
Definition at line 90 of file EOAuth2Service.php.
Referenced by authenticate().
|
protected |
Returns the url to request to get OAuth2 access token.
Reimplemented in GoogleOAuthService, MailruOAuthService, FacebookOAuthService, OdnoklassnikiOAuthService, and MoikrugOAuthService.
Definition at line 98 of file EOAuth2Service.php.
Referenced by getAccessToken().
EOAuth2Service::makeSignedRequest | ( | $url, | |
$options = array() , |
|||
$parseJson = true |
|||
) |
Returns the protected resource.
string | $url | url to request. |
array | $options | HTTP request options. Keys: query, data, referer. |
boolean | $parseJson | Whether to parse response in json format. |
Reimplemented in MailruOAuthService, and MoikrugOAuthService.
Definition at line 145 of file EOAuth2Service.php.
References EAuthServiceBase\getIsAuthenticated(), and EAuthServiceBase\makeRequest().
Referenced by CustomVKontakteService\fetchAttributes(), FacebookService\fetchAttributes(), FacebookOAuthService\fetchAttributes(), GoogleOAuthService\fetchAttributes(), and VKontakteOAuthService\fetchAttributes().
|
protected |
Restore access token from the session.
Reimplemented in VKontakteOAuthService, and MailruOAuthService.
Definition at line 124 of file EOAuth2Service.php.
References EAuthServiceBase\getState(), and EAuthServiceBase\hasState().
Referenced by authenticate().
|
protected |
Save access token to the session.
string | $token | access token. |
Reimplemented in VKontakteOAuthService, GoogleOAuthService, MailruOAuthService, FacebookOAuthService, and MoikrugOAuthService.
Definition at line 115 of file EOAuth2Service.php.
References EAuthServiceBase\setState().
Referenced by authenticate().
|
protected |
Definition at line 36 of file EOAuth2Service.php.