diff --git a/src/Omniphx/Forrest/Client.php b/src/Omniphx/Forrest/Client.php index 754859e..eafb852 100644 --- a/src/Omniphx/Forrest/Client.php +++ b/src/Omniphx/Forrest/Client.php @@ -719,6 +719,16 @@ public function getToken() return $this->tokenRepo->get(); } + /** + * Determine whether token exists + * + * @return bool + */ + public function hasToken() + { + return $this->tokenRepo->has(); + } + /** * Returns any resource that is available to the authenticated * user. Reference Force.com's REST API guide to read about more diff --git a/src/Omniphx/Forrest/Providers/Laravel/Facades/Forrest.php b/src/Omniphx/Forrest/Providers/Laravel/Facades/Forrest.php index fdf6644..c057560 100644 --- a/src/Omniphx/Forrest/Providers/Laravel/Facades/Forrest.php +++ b/src/Omniphx/Forrest/Providers/Laravel/Facades/Forrest.php @@ -8,6 +8,7 @@ * @method static \Illuminate\Http\RedirectResponse|void authenticate() * @method static void refresh() * @method static \Psr\Http\Message\ResponseInterface|void revoke() + * @method static bool hasToken() * @method static void setCredentials(array $credentials) * @method static string|array versions(array $options = []) * @method static string|array resources(array $options = []) @@ -55,7 +56,7 @@ * @method static string|array actions(string $resource, array $options = []) * @method static string|array support(string $resource, array $options = []) * @method static \Omniphx\Forrest\Interfaces\RedirectInterface callback() -*/ + */ class Forrest extends Facade { /**