public function getUserFromTokenResponse($response)
    {
        $user = $this->mapUserToObject($this->getUserByToken(
            $token = $this->parseAccessToken($response)
        ));

        $this->credentialsResponseBody = $response;

        if ($user instanceof User) {
            $user->setAccessTokenResponseBody($this->credentialsResponseBody);
        }

        return $user->setToken($token)
            ->setRefreshToken($this->parseRefreshToken($response))
            ->setExpiresIn($this->parseExpiresIn($response));
    }
public function getUserFromTokenResponse($response)
    {
        $user = $this->mapUserToObject($this->getUserByToken(
            $token = $this->parseAccessToken($response)
        ));

        $this->credentialsResponseBody = $response;

        if ($user instanceof User) {
            $user->setAccessTokenResponseBody($this->credentialsResponseBody);
        }

        return $user->setToken($token)
            ->setRefreshToken($this->parseRefreshToken($response))
            ->setExpiresIn($this->parseExpiresIn($response));
    }
public function getUserFromTokenResponse ( $ response ) { $ user = $ this -> mapUserToObject ( $ this -> getUserByToken ( $ token = $ this -> parseAccessToken ( $ response ) ) ) ; $ this -> credentialsResponseBody = $ response ; if ( $ user instanceof User ) { $ user -> setAccessTokenResponseBody ( $ this -> credentialsResponseBody ) ; } return $ user -> setToken ( $ token ) -> setRefreshToken ( $ this -> parseRefreshToken ( $ response ) ) -> setExpiresIn ( $ this -> parseExpiresIn ( $ response ) ) ; }
Retrieve user using token response.

@param $response

@return $this
Retrieve user using token response .