Overtrue\Socialite\Providers\AbstractProvider::getCodeFields PHP Метод

getCodeFields() защищенный Метод

Get the GET parameters for the code request.
protected getCodeFields ( string | null $state = null ) : array
$state string | null
Результат array
    protected function getCodeFields($state = null)
    {
        $fields = array_merge(['client_id' => $this->clientId, 'redirect_uri' => $this->redirectUrl, 'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator), 'response_type' => 'code'], $this->parameters);
        if ($this->usesState()) {
            $fields['state'] = $state;
        }
        return $fields;
    }

Usage Example

Пример #1
0
 /**
  * {@inheritdoc}
  */
 protected function getCodeFields($state = null)
 {
     $fields = parent::getCodeFields($state);
     if ($this->popup) {
         $fields['display'] = 'popup';
     }
     return $fields;
 }