Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add hasToken method #351

Merged
merged 2 commits into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/Omniphx/Forrest/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/Omniphx/Forrest/Providers/Laravel/Facades/Forrest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
Expand Down Expand Up @@ -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
{
/**
Expand Down
Loading