public static function verifyCredentials(array $tokenCredentials, $userDataUrl)
    {
        $instance = new static;

        if (! $instance->protocol = self::getAuthProtocol($tokenCredentials)) {
            throw new \InvalidArgumentException('Credential keys are invalid.');
        }

        $instance->addToCredentials($tokenCredentials);
        $instance->filterCredentialsByKey('token_credentials');

        return $instance->fetchUserData($userDataUrl);

    }
public static function verifyCredentials(array $tokenCredentials, $userDataUrl)
    {
        $instance = new static;

        if (! $instance->protocol = self::getAuthProtocol($tokenCredentials)) {
            throw new \InvalidArgumentException('Credential keys are invalid.');
        }

        $instance->addToCredentials($tokenCredentials);
        $instance->filterCredentialsByKey('token_credentials');

        return $instance->fetchUserData($userDataUrl);

    }
public static function verifyCredentials ( array $ tokenCredentials , $ userDataUrl ) { $ instance = new static ; if ( ! $ instance -> protocol = self :: getAuthProtocol ( $ tokenCredentials ) ) { throw new \ InvalidArgumentException ( 'Credential keys are invalid.' ) ; } $ instance -> addToCredentials ( $ tokenCredentials ) ; $ instance -> filterCredentialsByKey ( 'token_credentials' ) ; return $ instance -> fetchUserData ( $ userDataUrl ) ; }
Checks the token credentials and returns an object with its account data.

@param  array  $tokenCredentials
@param  string $userDataUrl
@return object
Checks the token credentials and returns an object with its account data .