class PasswordBrokerManager implements PasswordBrokerFactory mixin PasswordBroker

Constants

DEFAULT_EXPIRE_MINUTES

DEFAULT_BROKER_CONTEXT_KEY

The coroutine context key holding the per-request default broker override.

Properties

protected PasswordBroker> $brokers

The array of created "drivers".

Methods

__construct(Container $app)

Create a new PasswordBroker manager instance.

broker(UnitEnum|string|null $name = null)

Attempt to get the broker from the local cache.

resolve(string $name)

Resolve the given broker.

createTokenRepository(array $config)

Create a token repository instance based on the given configuration.

array|null
getConfig(string $name)

Get the password broker configuration.

string|null
resolveBrokerNameForGuard(UnitEnum|string $guard)

Resolve the password broker name declared by the given guard.

string
getDefaultDriver()

Get the default password broker name.

void
setDefaultDriver(UnitEnum|string $name)

Set the default password broker name.

void
refreshEventDispatcher(Dispatcher $events)

Refresh the event dispatcher on resolved brokers.

mixed
__call(string $method, array $parameters)

Dynamically call the default driver instance.

Details

at line 40
__construct(Container $app)

Create a new PasswordBroker manager instance.

Parameters

Container $app

at line 48
PasswordBroker broker(UnitEnum|string|null $name = null)

Attempt to get the broker from the local cache.

Parameters

UnitEnum|string|null $name

Return Value

PasswordBroker

at line 66
protected PasswordBroker resolve(string $name)

Resolve the given broker.

Parameters

string $name

Return Value

PasswordBroker

Exceptions

InvalidArgumentException

at line 89
protected TokenRepositoryInterface createTokenRepository(array $config)

Create a token repository instance based on the given configuration.

Parameters

array $config

Return Value

TokenRepositoryInterface

at line 127
protected array|null getConfig(string $name)

Get the password broker configuration.

Parameters

string $name

Return Value

array|null

at line 137
string|null resolveBrokerNameForGuard(UnitEnum|string $guard)

Resolve the password broker name declared by the given guard.

Parameters

UnitEnum|string $guard

Return Value

string|null

Exceptions

InvalidArgumentException

at line 163
string getDefaultDriver()

Get the default password broker name.

Resolves the coroutine-scoped override first, then the broker declared by the current default guard's "passwords" key.

Return Value

string

Exceptions

InvalidArgumentException

at line 185
void setDefaultDriver(UnitEnum|string $name)

Set the default password broker name.

Uses coroutine Context so one request's override doesn't affect others.

Parameters

UnitEnum|string $name

Return Value

void

at line 202
void refreshEventDispatcher(Dispatcher $events)

Refresh the event dispatcher on resolved brokers.

Boot or tests only. Replaces the dispatcher on every resolved concrete broker for the worker lifetime; per-request use races across coroutines. Reached by Event::fake() / Event::fakeFor() so cached brokers follow the active dispatcher and its later restoration.

Parameters

Dispatcher $events

Return Value

void

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

Dynamically call the default driver instance.

Parameters

string $method
array $parameters

Return Value

mixed