Example #1
0
 /**
  * Internal: Initialize Facebook adapter. This method isn't intended for public consumption.
  *
  * Basically on initializers we feed defaults values to \OAuth2\Template::initialize()
  *
  * let*() methods are similar to set, but 'let' will not overwrite the value if its already set
  */
 function initialize()
 {
     parent::initialize();
     $this->letApplicationId($this->getAdapterConfig('keys', 'id'));
     $this->letApplicationSecret($this->getAdapterConfig('keys', 'secret'));
     $scope = $this->getAdapterConfig('scope') ? $this->getAdapterConfig('scope') : 'email,user_about_me,user_birthday,user_hometown,user_website,read_stream,offline_access,publish_stream,read_friendlists';
     $this->letApplicationScope($scope);
     $this->letEndpointRedirectUri($this->getHybridauthEndpointUri());
     $this->letEndpointBaseUri('https://graph.facebook.com/');
     $this->letEndpointAuthorizeUri('https://www.facebook.com/dialog/oauth');
     $this->letEndpointRequestTokenUri('https://graph.facebook.com/oauth/access_token');
     $this->letEndpointAuthorizeUriAdditionalParameters(array('display' => 'page'));
 }
Example #2
0
 /**
  * Internal: Initialize Vkontakte adapter. This method isn't intended for public consumption.
  *
  * Basically on initializers we feed defaults values to \OAuth2\Template::initialize()
  *
  * let*() methods are similar to set, but 'let' will not overwrite the value if its already set
  */
 public function initialize()
 {
     parent::initialize();
     $this->letApplicationId($this->getAdapterConfig('keys', 'id'));
     $this->letApplicationSecret($this->getAdapterConfig('keys', 'secret'));
     // @ todo create a way to track scope & request addtl scope as needed
     $scope = $this->getAdapterConfig('scope') ? $this->getAdapterConfig('scope') : 'email';
     $this->letApplicationScope($scope);
     $this->letEndpointRedirectUri($this->getHybridauthEndpointUri());
     $this->letEndpointBaseUri($this->apiBaseUrl);
     $this->letEndpointAuthorizeUri($this->authorizeUrl);
     $this->letEndpointRequestTokenUri($this->accessTokenUrl);
 }
Example #3
0
 /**
  * Internal: Initialize Google adapter. This method isn't intended for public consumption.
  *
  * Basically on initializers we feed defaults values to \OAuth2\Template::initialize()
  *
  * let*() methods are similar to set, but 'let' will not overwrite the value if its already set
  */
 function initialize()
 {
     parent::initialize();
     $this->letApplicationId($this->getAdapterConfig('keys', 'id'));
     $this->letApplicationSecret($this->getAdapterConfig('keys', 'secret'));
     $scope = $this->getAdapterConfig('scope') ? $this->getAdapterConfig('scope') : 'https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email https://www.google.com/m8/feeds/';
     $this->letApplicationScope($scope);
     $this->letEndpointBaseUri('');
     $this->letEndpointRedirectUri($this->getHybridauthEndpointUri());
     $this->letEndpointAuthorizeUri('https://accounts.google.com/o/oauth2/auth');
     $this->letEndpointRequestTokenUri('https://accounts.google.com/o/oauth2/token');
     $this->letEndpointTokenInfoUri('https://www.googleapis.com/oauth2/v1/tokeninfo');
     $this->letEndpointAuthorizeUriAdditionalParameters(array('access_type' => 'offline'));
 }
Example #4
0
 function loginFinish()
 {
     parent::loginFinish(array(), 'POST');
 }