/** * Internal: Initialize Windows 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') : 'wl.basic wl.emails wl.signin wl.share wl.birthday'; $this->letApplicationScope($scope); $this->letEndpointRedirectUri($this->getHybridauthEndpointUri()); $this->letEndpointBaseUri('https://apis.live.net/v5.0/'); $this->letEndpointAuthorizeUri('https://login.live.com/oauth20_authorize.srf'); $this->letEndpointRequestTokenUri('https://login.live.com/oauth20_token.srf'); }
/** * 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')); }
/** * 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); }
/** * 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')); }