本文整理汇总了PHP中HWI\Bundle\OAuthBundle\OAuth\ResourceOwner\GenericOAuth2ResourceOwner::getAuthorizationUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP GenericOAuth2ResourceOwner::getAuthorizationUrl方法的具体用法?PHP GenericOAuth2ResourceOwner::getAuthorizationUrl怎么用?PHP GenericOAuth2ResourceOwner::getAuthorizationUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HWI\Bundle\OAuthBundle\OAuth\ResourceOwner\GenericOAuth2ResourceOwner
的用法示例。
在下文中一共展示了GenericOAuth2ResourceOwner::getAuthorizationUrl方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAuthorizationUrl
/**
* {@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: getAuthorizationUrl
/**
* {@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: getAuthorizationUrl
/**
* {@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: getAuthorizationUrl
/**
* {@inheritDoc}
*/
public function getAuthorizationUrl($redirectUri, array $extraParameters = array())
{
return parent::getAuthorizationUrl($redirectUri, array_merge(array('display' => $this->options['display']), $extraParameters));
}
示例5: getAuthorizationUrl
/**
* {@inheritDoc}
*/
public function getAuthorizationUrl($redirectUri, array $extraParameters = array())
{
return parent::getAuthorizationUrl($redirectUri, array_merge(array('type' => 'web_server'), $extraParameters));
}
示例6: getAuthorizationUrl
/**
* {@inheritDoc}
*/
public function getAuthorizationUrl($redirectUri, array $extraParameters = array())
{
return parent::getAuthorizationUrl($redirectUri, $extraParameters + array('resource' => $this->options['resource']));
}
示例7: testGetAuthorizationUrl
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/'));
}