Menu

## AuthenticationBackendMock extends AuthenticationBackend
in package
Uses HelperMocksTrait

AuthenticationBackendMock.php : 10

Base class for other Authentication backend to inherit.

You have access to the application container via `$this->context`

### Table of Contents

#### Properties

$context : ContainerInterface|Container|null
  Application container context
$limitServices : array<string|int, mixed>
  limit the services this authentication backend can run on

#### Methods

__construct() : mixed
afterRun() : mixed
  Hook to run after the authentication has been run
authenticate() : ContextUserObject|null
beforeRun() : mixed
  Hook to run before the authentication has been run
createMockContextUser() : ContextUserObject
  This would be mimicking a user we got from our db
createMockSettings() : EnvResolver
getOrDefault() : mixed
  Get a value from the container or return a default value
getOrFail() : mixed
getSilently() : mixed
set() : void
  Set a value in the container
contextHas() : bool

### Properties

#### $context

Containable.php : 20

Application container context

`public ContainerInterface|Container|null $context`

#### $limitServices

AuthenticationBackend.php : 22

limit the services this authentication backend can run on

`public array<string|int, mixed> $limitServices = []`

### Methods

#### __construct()

Containable.php : 12
`public __construct([ContainerInterface|Container|null $context = null ]) : mixed`

##### Parameters

$context : ContainerInterface|Container|null = null

#### afterRun()

AuthenticationBackend.php : 31

Hook to run after the authentication has been run

`public afterRun(Request $request) : mixed`

##### Parameters

$request : Request

#### authenticate()

AuthenticationBackendMock.php : 14
`public authenticate(Request $request) : ContextUserObject|null`

##### Parameters

$request : Request

##### Return values

ContextUserObject|null

#### beforeRun()

AuthenticationBackend.php : 26

Hook to run before the authentication has been run

`public beforeRun(Request $request) : mixed`

##### Parameters

$request : Request

#### createMockContextUser()

HelperMocksTrait.php : 15

This would be mimicking a user we got from our db

`public createMockContextUser([ContextUserObject|null $customObj = null ]) : ContextUserObject`

##### Parameters

$customObj : ContextUserObject|null = null

##### Return values

ContextUserObject

#### createMockSettings()

HelperMocksTrait.php : 41
`public createMockSettings() : EnvResolver`

##### Return values

EnvResolver

#### getOrDefault()

Containable.php : 51

Get a value from the container or return a default value

`public getOrDefault(string $key, mixed $default) : mixed`

##### Parameters

$key : string
$default : mixed

#### getOrFail()

Containable.php : 60
`public getOrFail(mixed $key) : mixed`

##### Parameters

$key : mixed

##### Tags

throws
  ContainerExceptionInterface
throws
  NotFoundExceptionInterface

#### getSilently()

Containable.php : 36
`public getSilently(mixed $key) : mixed`

##### Parameters

$key : mixed

#### set()

Containable.php : 31

Set a value in the container

`public set(string $name, mixed $value) : void`

##### Parameters

$name : string
$value : mixed

#### contextHas()

Containable.php : 23
`protected contextHas(string $key) : bool`

##### Parameters

$key : string

##### Return values

bool

## Search results