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

Add suggested changes

This commit is contained in:
adityaoberai 2022-04-03 22:07:49 +05:30
parent 90e55f4c34
commit 528b4eb947

View file

@ -172,27 +172,30 @@ class Auth0 extends OAuth2
/**
* Extracts the Client Secret from the JSON stored in appSecret
*
* @return string
*/
protected function getClientSecret(): string
{
$secret = $this->decodeJson();
$secret = $this->getAppSecret();
return (isset($secret['clientSecret'])) ? $secret['clientSecret'] : '';
}
/**
* Extracts the Auth0 Domain from the JSON stored in appSecret. Defaults to 'common' as a fallback
* Extracts the Auth0 Domain from the JSON stored in appSecret
*
* @return string
*/
protected function getAuth0Domain(): string
{
$secret = $this->decodeJson();
$secret = $this->getAppSecret();
return (isset($secret['auth0Domain'])) ? $secret['auth0Domain'] : '';
}
/**
* Decode the JSON stored in appSecret
*
* @return array
*/
protected function getAppSecret(): array