Pionia Core

AuthenticationChain
in package
implements AuthenticationChainContract Uses Microable, Containable

Authentication chain.

This class is responsible for managing the authentication backends in the application.

It will be run on every request to authenticate the user by the kernel

Table of Contents

Interfaces

AuthenticationChainContract

Properties

$context  : ContainerInterface|Container|null
Application container context
$macros  : array<string|int, mixed>
$application  : PioniaApplication
$authentications  : Arrayable

Methods

__call()  : mixed
Dynamically handle calls to the class.
__callStatic()  : mixed
Dynamically handle calls to the class.
__construct()  : mixed
addAfter()  : static
Add an authentication after another
addAuthenticationBackend()  : static
Adds an authentication backend to the chain
addBefore()  : static
Add an authentication backend before another
flushMacros()  : void
Remove all the macros we had registered
getAuthentications()  : array<string|int, mixed>
Get the authentications in chain
getOrDefault()  : mixed
Get a value from the container or return a default value
getOrFail()  : mixed
getSilently()  : mixed
hasMacro()  : bool
Check if we have a method in the balonables
isAuthenticationContract()  : bool
macro()  : void
Add a new mixable to the macros
mixin()  : void
Mix another object into the class.
next()  : void
Run the next authentication backend in the chain.
run()  : void
Run the authentication chain on a request
set()  : void
Set a value in the container
contextHas()  : bool
canRunOnCurrentService()  : bool

Properties

$macros

protected static array<string|int, mixed> $macros = []

Methods

__call()

Dynamically handle calls to the class.

public __call(string $method, array<string|int, mixed> $parameters) : mixed
Parameters
$method : string
$parameters : array<string|int, mixed>
Tags
throws
BadMethodCallException

__callStatic()

Dynamically handle calls to the class.

public static __callStatic(string $method, array<string|int, mixed> $parameters) : mixed
Parameters
$method : string
$parameters : array<string|int, mixed>
Tags
throws
BadMethodCallException

addAfter()

Add an authentication after another

public addAfter(string $authToPoint, string $authToAdd) : static
Parameters
$authToPoint : string
$authToAdd : string
Return values
static

addAuthenticationBackend()

Adds an authentication backend to the chain

public addAuthenticationBackend(string $authenticationContract) : static
Parameters
$authenticationContract : string
Return values
static

addBefore()

Add an authentication backend before another

public addBefore(string $authToPoint, string $authToAdd) : static
Parameters
$authToPoint : string
$authToAdd : string
Return values
static

flushMacros()

Remove all the macros we had registered

public static flushMacros() : void

getAuthentications()

Get the authentications in chain

public getAuthentications() : array<string|int, mixed>
Return values
array<string|int, mixed>

getOrDefault()

Get a value from the container or return a default value

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

getOrFail()

public getOrFail(mixed $key) : mixed
Parameters
$key : mixed
Tags
throws
ContainerExceptionInterface
throws
NotFoundExceptionInterface

getSilently()

public getSilently(mixed $key) : mixed
Parameters
$key : mixed

hasMacro()

Check if we have a method in the balonables

public static hasMacro(string $name) : bool
Parameters
$name : string
Return values
bool

isAuthenticationContract()

public isAuthenticationContract(string $authenticationContract) : bool
Parameters
$authenticationContract : string
Return values
bool

macro()

Add a new mixable to the macros

public static macro(string $key,  $value) : void
Parameters
$key : string
$value :

mixin()

Mix another object into the class.

public static mixin(object $mixin[, bool $replace = true ]) : void
Parameters
$mixin : object
$replace : bool = true
Tags
throws
ReflectionException

set()

Set a value in the container

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

contextHas()

protected contextHas(string $key) : bool
Parameters
$key : string
Return values
bool

        
On this page

Search results