class Illuminate / Auth / AuthManager

AuthManager

Implements

Uses

Properties

protected

$app Application

The application instance.

Default: null
protected

$customCreators array

The registered custom driver creators.

Default: []
protected

$guards array

The array of created "drivers".

Default: []
protected

$userResolver Closure

The user resolver shared by various services.

Determines the default user for Gate, Request, and the Authenticatable contract.

Default: null

Methods

public

__construct ( $app ) : void

Create a new Auth manager instance.

Parameters

public

guard ( $name ) : Guard |StatefulGuard

Attempt to get the guard from the local cache.

Parameters

  • $name string|null
protected

resolve ( $name ) : Guard |StatefulGuard

Resolve the given guard.

Parameters

  • $name string
protected

callCustomCreator ( $name , array $config ) : mixed

Call a custom driver creator.

Parameters

  • $name string
  • $config array
public

createSessionDriver ( $name , $config ) : SessionGuard

Create a session based authentication guard.

Parameters

  • $name string
  • $config array
public

createTokenDriver ( $name , $config ) : TokenGuard

Create a token based authentication guard.

Parameters

  • $name string
  • $config array
protected

getConfig ( $name ) : array

Get the guard configuration.

Parameters

  • $name string
public

getDefaultDriver ( ) : string

Get the default authentication driver name.

public

shouldUse ( $name ) : void

Set the default guard driver the factory should serve.

Parameters

  • $name string
public

setDefaultDriver ( $name ) : void

Set the default authentication driver name.

Parameters

  • $name string
public

viaRequest ( $driver , callable $callback ) : $this

Register a new callback based request guard.

Parameters

  • $driver string
  • $callback callable
public

userResolver ( ) : Closure

Get the user resolver callback.

public

resolveUsersUsing ( Closure $userResolver ) : $this

Set the callback to be used to resolve users.

Parameters

public

extend ( $driver , Closure $callback ) : $this

Register a custom driver creator Closure.

Parameters

public

provider ( $name , Closure $callback ) : $this

Register a custom provider creator Closure.

Parameters

public

hasResolvedGuards ( ) : bool

Determines if any guards have already been resolved.

public

forgetGuards ( ) : $this

Forget all of the resolved guard instances.

public

setApplication ( $app ) : $this

Set the application instance used by the manager.

Parameters

public

__call ( $method , $parameters ) : mixed

Dynamically call the default driver instance.

Parameters

  • $method string
  • $parameters array