AuthManager
class AuthManager implements Factory (View source)
Traits
CreatesUserProviders |
Properties
protected array | $customProviderCreators | The registered custom provider creators. | from CreatesUserProviders |
protected Application | $app | The application instance. | |
protected array | $customCreators | The registered custom driver creators. | |
protected array | $guards | The array of created "drivers". | |
protected Closure | $userResolver | The user resolver shared by various services. |
Methods
UserProvider|null | createUserProvider(string|null $provider = null) Create the user provider implementation for the driver. | from CreatesUserProviders |
array|null | getProviderConfiguration(string|null $provider) Get the user provider configuration. | from CreatesUserProviders |
DatabaseUserProvider | createDatabaseProvider(array $config) Create an instance of the database user provider. | from CreatesUserProviders |
EloquentUserProvider | createEloquentProvider(array $config) Create an instance of the Eloquent user provider. | from CreatesUserProviders |
string | getDefaultUserProvider() Get the default user provider name. | from CreatesUserProviders |
void | __construct(Application $app) Create a new Auth manager instance. | |
Guard|StatefulGuard | guard(string|null $name = null) Attempt to get the guard from the local cache. | |
Guard|StatefulGuard | resolve(string $name) Resolve the given guard. | |
mixed | callCustomCreator(string $name, array $config) Call a custom driver creator. | |
SessionGuard | createSessionDriver(string $name, array $config) Create a session based authentication guard. | |
TokenGuard | createTokenDriver(string $name, array $config) Create a token based authentication guard. | |
array | getConfig(string $name) Get the guard configuration. | |
string | getDefaultDriver() Get the default authentication driver name. | |
void | shouldUse(string $name) Set the default guard driver the factory should serve. | |
void | setDefaultDriver(string $name) Set the default authentication driver name. | |
$this | viaRequest(string $driver, callable $callback) Register a new callback based request guard. | |
Closure | userResolver() Get the user resolver callback. | |
$this | resolveUsersUsing(Closure $userResolver) Set the callback to be used to resolve users. | |
$this | extend(string $driver, Closure $callback) Register a custom driver creator Closure. | |
$this | provider(string $name, Closure $callback) Register a custom provider creator Closure. | |
bool | hasResolvedGuards() Determines if any guards have already been resolved. | |
mixed | __call(string $method, array $parameters) Dynamically call the default driver instance. |
Details
UserProvider|null createUserProvider(string|null $provider = null)
Create the user provider implementation for the driver.
protected array|null getProviderConfiguration(string|null $provider)
Get the user provider configuration.
protected DatabaseUserProvider createDatabaseProvider(array $config)
Create an instance of the database user provider.
protected EloquentUserProvider createEloquentProvider(array $config)
Create an instance of the Eloquent user provider.
string getDefaultUserProvider()
Get the default user provider name.
void __construct(Application $app)
Create a new Auth manager instance.
Guard|StatefulGuard guard(string|null $name = null)
Attempt to get the guard from the local cache.
protected Guard|StatefulGuard resolve(string $name)
Resolve the given guard.
protected mixed callCustomCreator(string $name, array $config)
Call a custom driver creator.
SessionGuard createSessionDriver(string $name, array $config)
Create a session based authentication guard.
TokenGuard createTokenDriver(string $name, array $config)
Create a token based authentication guard.
protected array getConfig(string $name)
Get the guard configuration.
string getDefaultDriver()
Get the default authentication driver name.
void shouldUse(string $name)
Set the default guard driver the factory should serve.
void setDefaultDriver(string $name)
Set the default authentication driver name.
$this viaRequest(string $driver, callable $callback)
Register a new callback based request guard.
Closure userResolver()
Get the user resolver callback.
$this resolveUsersUsing(Closure $userResolver)
Set the callback to be used to resolve users.
$this extend(string $driver, Closure $callback)
Register a custom driver creator Closure.
$this provider(string $name, Closure $callback)
Register a custom provider creator Closure.
bool hasResolvedGuards()
Determines if any guards have already been resolved.
mixed __call(string $method, array $parameters)
Dynamically call the default driver instance.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Auth/AuthManager.html