protected function auth($client)
{
if ($client instanceof OAuth2) {
return $this->authOAuth2($client);
} elseif ($client instanceof OAuth1) {
return $this->authOAuth1($client);
} elseif ($client instanceof OpenId) {
return $this->authOpenId($client);
}
throw new NotSupportedException('Provider "' . get_class($client) . '" is not supported.');
}