1
0
Fork 0
mirror of synced 2024-09-29 08:51:28 +13:00

feat: add method to check for email verification

This commit is contained in:
Christy Jacob 2022-04-27 22:08:32 +03:00
parent c145723b22
commit feb124d165
29 changed files with 299 additions and 19 deletions

View file

@ -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

View file

@ -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
*

View file

@ -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
*

View file

@ -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
*

View file

@ -148,6 +148,16 @@ class Bitly extends OAuth2
return '';
}
/**
* Is the OAuth email verified?
*
* @return bool
*/
public function isEmailVerififed(): bool
{
return false;
}
/**
* @param $accessToken
*

View file

@ -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
*

View file

@ -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
*

View file

@ -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
*

View file

@ -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
*

View file

@ -137,6 +137,16 @@ class Github extends OAuth2
return '';
}
/**
* Is the OAuth email verified?
*
* @return bool
*/
public function isEmailVerififed(): bool
{
return false;
}
/**
* @param $accessToken
*

View file

@ -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
*

View file

@ -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
*

View file

@ -148,6 +148,16 @@ class Linkedin extends OAuth2
return '';
}
/**
* Is the OAuth email verified?
*
* @return bool
*/
public function isEmailVerififed(): bool
{
return false;
}
/**
* @param $accessToken
*

View file

@ -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
*

View file

@ -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
*

View file

@ -134,6 +134,16 @@ class Notion extends OAuth2
return '';
}
/**
* Is the OAuth email verified?
*
* @return bool
*/
public function isEmailVerififed(): bool
{
return false;
}
/**
* @param $accessToken
*

View file

@ -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
*

View file

@ -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
*

View file

@ -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
*

View file

@ -141,6 +141,16 @@ class Spotify extends OAuth2
return '';
}
/**
* Is the OAuth email verified?
*
* @return bool
*/
public function isEmailVerififed(): bool
{
return false;
}
/**
* @param $accessToken
*

View file

@ -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
*

View file

@ -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
*

View file

@ -140,6 +140,16 @@ class Twitch extends OAuth2
return '';
}
/**
* Is the OAuth email verified?
*
* @return bool
*/
public function isEmailVerififed(): bool
{
return false;
}
/**
* @param $accessToken
*

View file

@ -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
*

View file

@ -131,6 +131,16 @@ class WordPress extends OAuth2
return '';
}
/**
* Is the OAuth email verified?
*
* @return bool
*/
public function isEmailVerififed(): bool
{
return false;
}
/**
* @param $accessToken
*

View file

@ -161,6 +161,16 @@ class Yahoo extends OAuth2
return '';
}
/**
* Is the OAuth email verified?
*
* @return bool
*/
public function isEmailVerififed(): bool
{
return false;
}
/**
* @param $accessToken
*

View file

@ -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
*

View file

@ -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
*

View file

@ -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
*