OAuth2\Service\Configuration::getAuthorizeEndpoint PHP Method

getAuthorizeEndpoint() public method

public getAuthorizeEndpoint ( ) : string
return string
    public function getAuthorizeEndpoint()
    {
        return $this->_authorizeEndpoint;
    }

Usage Example

Example #1
0
 /**
  * redirect to authorize endpoint of service
  */
 public function authorize(array $userParameters = array())
 {
     $parameters = array_merge($userParameters, array('type' => 'web_server', 'client_id' => $this->_client->getClientKey(), 'redirect_uri' => $this->_client->getCallbackUrl(), 'response_type' => 'code'));
     if ($this->_scope) {
         $parameters['scope'] = $this->_scope;
     }
     $url = $this->_configuration->getAuthorizeEndpoint();
     $url .= (strpos($url, '?') !== false ? '&' : '?') . http_build_query($parameters);
     header('Location: ' . $url);
     die;
 }
All Usage Examples Of OAuth2\Service\Configuration::getAuthorizeEndpoint