class AuthManager implements Factory (View source)

Traits

Methods

createUserProvider( string $provider)

Create the user provider implementation for the driver.

void
__construct( Application $app)

Create a new Auth manager instance.

mixed
guard( string|null $name = null)

Attempt to get the guard from the local cache.

createSessionDriver( string $name, array $config)

Create a session based authentication guard.

createTokenDriver( string $name, array $config)

Create a token based authentication guard.

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.

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.

mixed
__call( string $method, array $parameters)

Dynamically call the default driver instance.

Details

UserProvider createUserProvider( string $provider)

Create the user provider implementation for the driver.

Parameters

string $provider

Return Value

UserProvider

Exceptions

InvalidArgumentException

at line line 49
void __construct( Application $app)

Create a new Auth manager instance.

Parameters

Application $app

Return Value

void

at line line 64
mixed guard( string|null $name = null)

Attempt to get the guard from the local cache.

Parameters

string|null $name

Return Value

mixed

at line line 121
SessionGuard createSessionDriver( string $name, array $config)

Create a session based authentication guard.

Parameters

string $name
array $config

Return Value

SessionGuard

at line line 152
TokenGuard createTokenDriver( string $name, array $config)

Create a token based authentication guard.

Parameters

string $name
array $config

Return Value

TokenGuard

at line line 183
string getDefaultDriver()

Get the default authentication driver name.

Return Value

string

at line line 194
void shouldUse( string $name)

Set the default guard driver the factory should serve.

Parameters

string $name

Return Value

void

at line line 205
void setDefaultDriver( string $name)

Set the default authentication driver name.

Parameters

string $name

Return Value

void

at line line 217
$this viaRequest( string $driver, callable $callback)

Register a new callback based request guard.

Parameters

string $driver
callable $callback

Return Value

$this

at line line 233
Closure userResolver()

Get the user resolver callback.

Return Value

Closure

at line line 244
$this resolveUsersUsing( Closure $userResolver)

Set the callback to be used to resolve users.

Parameters

Closure $userResolver

Return Value

$this

at line line 258
$this extend( string $driver, Closure $callback)

Register a custom driver creator Closure.

Parameters

string $driver
Closure $callback

Return Value

$this

at line line 272
$this provider( string $name, Closure $callback)

Register a custom provider creator Closure.

Parameters

string $name
Closure $callback

Return Value

$this

at line line 286
mixed __call( string $method, array $parameters)

Dynamically call the default driver instance.

Parameters

string $method
array $parameters

Return Value

mixed