public function normalizeData(PathUserResponse $response)
    {
        $return   = $response->getResponse();
        $provider = $response->getResourceOwner()->getName();
        $token    = $response->getAccessToken();

        switch ($provider) {
            case 'google':
                $data = $this->normalizeGoogle($return);
                break;

            case 'facebook':
                $data = $this->normalizeFacebook($return);
                break;

            case 'github':
                $data = $this->normalizeGithub($return, $token);
                break;
        }

        $data['provider'] = $provider;
        $data['token'] = $token;

        return $data;
    }
public function normalizeData(PathUserResponse $response)
    {
        $return   = $response->getResponse();
        $provider = $response->getResourceOwner()->getName();
        $token    = $response->getAccessToken();

        switch ($provider) {
            case 'google':
                $data = $this->normalizeGoogle($return);
                break;

            case 'facebook':
                $data = $this->normalizeFacebook($return);
                break;

            case 'github':
                $data = $this->normalizeGithub($return, $token);
                break;
        }

        $data['provider'] = $provider;
        $data['token'] = $token;

        return $data;
    }
public function normalizeData ( PathUserResponse $ response ) { $ return = $ response -> getResponse ( ) ; $ provider = $ response -> getResourceOwner ( ) -> getName ( ) ; $ token = $ response -> getAccessToken ( ) ; switch ( $ provider ) { case 'google' : $ data = $ this -> normalizeGoogle ( $ return ) ; break ; case 'facebook' : $ data = $ this -> normalizeFacebook ( $ return ) ; break ; case 'github' : $ data = $ this -> normalizeGithub ( $ return , $ token ) ; break ; } $ data [ 'provider' ] = $ provider ; $ data [ 'token' ] = $ token ; return $ data ; }
Get oAuth data and normalize it to same var names

@param HttpMessageInterface $response oAuth response

@return array with normalized data
Get oAuth data and normalize it to same var names