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

feat: add macroable guards #459

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
5 changes: 4 additions & 1 deletion src/Guards/AuthenticationGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Auth0\SDK\Utility\HttpResponse;
use Illuminate\Auth\Events\{Login, Logout};
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Support\Traits\Macroable;

use Throwable;

Expand All @@ -26,7 +27,9 @@
* @api
*/
final class AuthenticationGuard extends GuardAbstract implements AuthenticationGuardContract
{
{
use Macroable;

/**
* @var string
*/
Expand Down
3 changes: 3 additions & 0 deletions src/Guards/AuthorizationGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Auth0\Laravel\UserProviderContract;
use Auth0\SDK\Utility\HttpResponse;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Support\Traits\Macroable;

use function is_array;
use function is_string;
Expand All @@ -19,6 +20,8 @@
*/
final class AuthorizationGuard extends GuardAbstract implements AuthorizationGuardContract
{
use Macroable;

public function find(): ?CredentialEntityContract
{
if ($this->isImpersonating()) {
Expand Down
Loading