コード例 #1
0
 /**
  * {@inheritDoc}
  */
 public function getAuthorizationUrl($redirectUri, array $extraParameters = array())
 {
     $url = parent::getAuthorizationUrl($redirectUri, array_merge(array('access_type' => $this->options['access_type'], 'approval_prompt' => $this->options['approval_prompt'], 'request_visible_actions' => $this->options['request_visible_actions'], 'prompt' => $this->options['prompt']), $extraParameters));
     // This parameter have specific value (uses "&" as a separator of domains)
     if (null !== $this->options['hd']) {
         $url .= '&hd=' . implode('&', array_map('trim', explode(',', $this->options['hd'])));
     }
     return $url;
 }
コード例 #2
0
 /**
  * {@inheritDoc}
  */
 public function getAuthorizationUrl($redirectUri, array $extraParameters = array())
 {
     $extraOptions = array();
     if (isset($this->options['display'])) {
         $extraOptions['display'] = $this->options['display'];
     }
     if (isset($this->options['auth_type'])) {
         $extraOptions['auth_type'] = $this->options['auth_type'];
     }
     return parent::getAuthorizationUrl($redirectUri, array_merge($extraOptions, $extraParameters));
 }
コード例 #3
0
 /**
  * {@inheritDoc}
  */
 public function getAuthorizationUrl($redirectUri, array $extraParameters = array())
 {
     return parent::getAuthorizationUrl($redirectUri, array_merge(array('access_type' => $this->options['access_type'], 'approval_prompt' => $this->options['approval_prompt'], 'request_visible_actions' => $this->options['request_visible_actions'], 'hd' => $this->options['hd'], 'prompt' => $this->options['prompt']), $extraParameters));
 }
コード例 #4
0
 /**
  * {@inheritDoc}
  */
 public function getAuthorizationUrl($redirectUri, array $extraParameters = array())
 {
     return parent::getAuthorizationUrl($redirectUri, array_merge(array('display' => $this->options['display']), $extraParameters));
 }
コード例 #5
0
 /**
  * {@inheritDoc}
  */
 public function getAuthorizationUrl($redirectUri, array $extraParameters = array())
 {
     return parent::getAuthorizationUrl($redirectUri, array_merge(array('type' => 'web_server'), $extraParameters));
 }
コード例 #6
0
 /**
  * {@inheritDoc}
  */
 public function getAuthorizationUrl($redirectUri, array $extraParameters = array())
 {
     return parent::getAuthorizationUrl($redirectUri, $extraParameters + array('resource' => $this->options['resource']));
 }
コード例 #7
0
 public function testGetAuthorizationUrl()
 {
     $this->assertEquals('http://user.auth/?response_type=code&client_id=clientid&scope=&redirect_uri=http%3A%2F%2Fredirect.to%2F', $this->resourceOwner->getAuthorizationUrl('http://redirect.to/'));
 }