PHP 8.3.31
Preview: RequestGuard.php Size: 2.10 KB
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/Auth/RequestGuard.php

<?php

namespace Illuminate\Auth;

use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\UserProvider;
use Illuminate\Http\Request;
use Illuminate\Support\Traits\Macroable;

class RequestGuard implements Guard
{
    use GuardHelpers, Macroable;

    /**
     * The guard callback.
     *
     * @var callable
     */
    protected $callback;

    /**
     * The request instance.
     *
     * @var \Illuminate\Http\Request
     */
    protected $request;

    /**
     * Create a new authentication guard.
     *
     * @param  callable  $callback
     * @param  \Illuminate\Http\Request  $request
     * @param  \Illuminate\Contracts\Auth\UserProvider|null  $provider
     * @return void
     */
    public function __construct(callable $callback, Request $request, ?UserProvider $provider = null)
    {
        $this->request = $request;
        $this->callback = $callback;
        $this->provider = $provider;
    }

    /**
     * Get the currently authenticated user.
     *
     * @return \Illuminate\Contracts\Auth\Authenticatable|null
     */
    public function user()
    {
        // If we've already retrieved the user for the current request we can just
        // return it back immediately. We do not want to fetch the user data on
        // every call to this method because that would be tremendously slow.
        if (! is_null($this->user)) {
            return $this->user;
        }

        return $this->user = call_user_func(
            $this->callback, $this->request, $this->getProvider()
        );
    }

    /**
     * Validate a user's credentials.
     *
     * @param  array  $credentials
     * @return bool
     */
    public function validate(#[\SensitiveParameter] array $credentials = [])
    {
        return ! is_null((new static(
            $this->callback, $credentials['request'], $this->getProvider()
        ))->user());
    }

    /**
     * Set the current request instance.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return $this
     */
    public function setRequest(Request $request)
    {
        $this->request = $request;

        return $this;
    }
}

Directory Contents

Dirs: 7 × Files: 16

Name Size Perms Modified Actions
Access DIR
- drwxrwxrwx 2025-09-17 06:52:56
Edit Download
Console DIR
- drwxrwxrwx 2025-09-17 06:52:56
Edit Download
Events DIR
- drwxrwxrwx 2025-09-17 06:52:56
Edit Download
Listeners DIR
- drwxrwxrwx 2025-09-17 06:52:56
Edit Download
- drwxrwxrwx 2025-09-17 06:52:56
Edit Download
- drwxrwxrwx 2025-09-17 06:52:56
Edit Download
Passwords DIR
- drwxrwxrwx 2025-09-17 06:52:56
Edit Download
2.12 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
1.81 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
8.31 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
3.04 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
1.24 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
2.43 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
5.51 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
7.05 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
2.69 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
2.48 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
1.05 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
979 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
1.83 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
2.10 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
27.28 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
3.42 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).