feat: add method to check for email verification
This commit is contained in:
parent
c145723b22
commit
feb124d165
29 changed files with 299 additions and 19 deletions
|
@ -78,14 +78,14 @@ abstract class OAuth2
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function getUserID(string $accessToken):string;
|
||||
abstract public function getUserEmail(string $accessToken): string;
|
||||
|
||||
/**
|
||||
* @param $accessToken
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return string
|
||||
* @return bool
|
||||
*/
|
||||
abstract public function getUserEmail(string $accessToken):string;
|
||||
abstract public function isEmailVerififed(): bool;
|
||||
|
||||
/**
|
||||
* @param $accessToken
|
||||
|
|
|
@ -146,6 +146,16 @@ class Amazon extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -146,6 +146,16 @@ class Apple extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -130,6 +130,16 @@ class Bitbucket extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -148,6 +148,16 @@ class Bitly extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $accessToken
|
||||
*
|
||||
|
|
|
@ -147,6 +147,16 @@ class Box extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -141,6 +141,16 @@ class Discord extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -131,6 +131,16 @@ class Dropbox extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -129,6 +129,16 @@ class Facebook extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -137,6 +137,16 @@ class Github extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $accessToken
|
||||
*
|
||||
|
|
|
@ -127,6 +127,16 @@ class Gitlab extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -137,6 +137,16 @@ class Google extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -148,6 +148,16 @@ class Linkedin extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $accessToken
|
||||
*
|
||||
|
|
|
@ -137,6 +137,16 @@ class Microsoft extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -130,6 +130,16 @@ class Mock extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -134,6 +134,16 @@ class Notion extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $accessToken
|
||||
*
|
||||
|
|
|
@ -154,6 +154,16 @@ class Paypal extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -148,6 +148,16 @@ class Salesforce extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -128,6 +128,16 @@ class Slack extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -141,6 +141,16 @@ class Spotify extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $accessToken
|
||||
*
|
||||
|
|
|
@ -141,6 +141,16 @@ class Stripe extends OAuth2
|
|||
return $user['email'] ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $accessToken
|
||||
*
|
||||
|
|
|
@ -141,6 +141,16 @@ class Tradeshift extends OAuth2
|
|||
return $user['Username'] ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -140,6 +140,16 @@ class Twitch extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $accessToken
|
||||
*
|
||||
|
|
|
@ -150,6 +150,16 @@ class Vk extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -131,6 +131,16 @@ class WordPress extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $accessToken
|
||||
*
|
||||
|
|
|
@ -161,6 +161,16 @@ class Yahoo extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $accessToken
|
||||
*
|
||||
|
|
|
@ -130,6 +130,16 @@ class Yammer extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -144,6 +144,16 @@ class Yandex extends OAuth2
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accessToken
|
||||
*
|
||||
|
|
|
@ -126,6 +126,16 @@ class Zoom extends OAuth2
|
|||
return $response['email'] ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the OAuth email verified?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerififed(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $accessToken
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue