3 require_once(dirname(dirname(dirname(dirname(dirname(__FILE__))))) .
'/oauth/libextinc/OAuth.php');
35 assert(
'is_array($info)');
36 assert(
'is_array($config)');
43 $this->key = $configObject->getString(
'key');
44 $this->secret = $configObject->getString(
'secret');
45 $this->force_login = $configObject->getBoolean(
'force_login', FALSE);
46 $this->include_email = $configObject->getBoolean(
'include_email', FALSE);
56 assert(
'is_array($state)');
74 $url =
'https://api.twitter.com/oauth/authenticate';
75 if ($this->force_login) {
76 $url = \SimpleSAML\Utils\HTTP::addURLParameters(
$url,
array(
'force_login' =>
'true'));
84 $parameters =
array();
86 if (!isset($_REQUEST[
'oauth_token'])) {
89 if (
$requestToken->key !== (
string)$_REQUEST[
'oauth_token']) {
93 if (!isset($_REQUEST[
'oauth_verifier'])) {
96 $parameters[
'oauth_verifier'] = (
string)$_REQUEST[
'oauth_verifier'];
108 $verify_credentials_url =
'https://api.twitter.com/1.1/account/verify_credentials.json';
109 if ($this->include_email) {
110 $verify_credentials_url = $verify_credentials_url .
'?include_email=true';
120 if (is_string($value))
static getModuleURL($resource, array $parameters=array())
Get absolute URL to a specified module resource.
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
Create styles array
The data for the language used.
static loadFromArray($config, $location='[ARRAY]', $instance=null)
Loads a configuration from the given array.
static saveState(&$state, $stage, $rawId=false)
Save the state.