MfaProviderPropertyManager implements LoggerAwareInterface uses LoggerAwareTrait

Basic manager for MFA providers to access and update their properties (information) from the mfa column in the user array.

Table of Contents

Interfaces

LoggerAwareInterface

Constants

DATABASE_FIELD_NAME  = 'mfa'

Properties

$mfa  : array<string|int, mixed>
$providerIdentifier  : string
$providerProperties  : array<string|int, mixed>
$user  : AbstractUserAuthentication

Methods

__construct()  : mixed
create()  : MfaProviderPropertyManager
Create property manager for the user with the given provider
createProviderEntry()  : bool
Create a new provider entry for the current user Note: If an entry already exists, use updateProperties() instead.
deleteProviderEntry()  : bool
Delete a provider entry for the current user
getIdentifier()  : string
Return the current providers identifier
getProperties()  : array<string|int, mixed>
Get provider specific properties
getProperty()  : mixed|null
Get a provider specific property value or the defined default value if the requested property was not found.
getUser()  : AbstractUserAuthentication
Return the current user
hasProperty()  : bool
Check if a provider property exists
hasProviderEntry()  : bool
Check if a provider entry exists for the current user
updateProperties()  : bool
Update the provider properties Note: If no entry exists yet, use createProviderEntry() instead.
storeProperties()  : bool
Stores the updated properties in the user array and the database

Constants

DATABASE_FIELD_NAME

protected mixed DATABASE_FIELD_NAME = 'mfa'

Properties

$mfa

protected array<string|int, mixed> $mfa

$providerIdentifier

protected string $providerIdentifier

$providerProperties

protected array<string|int, mixed> $providerProperties

Methods

createProviderEntry()

Create a new provider entry for the current user Note: If an entry already exists, use updateProperties() instead.

public createProviderEntry(array<string|int, mixed> $properties) : bool

This can be checked with hasProviderEntry().

Parameters
$properties : array<string|int, mixed>
Return values
bool

deleteProviderEntry()

Delete a provider entry for the current user

public deleteProviderEntry() : bool
Tags
throws
JsonException
Return values
bool

getIdentifier()

Return the current providers identifier

public getIdentifier() : string
Return values
string

getProperties()

Get provider specific properties

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

getProperty()

Get a provider specific property value or the defined default value if the requested property was not found.

public getProperty(string $key[, null $default = null ]) : mixed|null
Parameters
$key : string
$default : null = null
Return values
mixed|null

hasProperty()

Check if a provider property exists

public hasProperty(string $key) : bool
Parameters
$key : string
Return values
bool

hasProviderEntry()

Check if a provider entry exists for the current user

public hasProviderEntry() : bool
Return values
bool

updateProperties()

Update the provider properties Note: If no entry exists yet, use createProviderEntry() instead.

public updateProperties(array<string|int, mixed> $properties) : bool

This can be checked with hasProviderEntry().

Parameters
$properties : array<string|int, mixed>
Return values
bool

storeProperties()

Stores the updated properties in the user array and the database

protected storeProperties() : bool
Tags
throws
JsonException
Return values
bool

        
On this page

Search results