AuthConfigurationStorage
extends ConfigurationStorage
in package
Class representing a configuration storage
Table of Contents
- CONFIG_STORAGE_NAMESPACE = 'modules/gambio/2fa'
- Configuration storage namespace
- SECRET_CONFIG_KEY_TEMPLATE = 'secrets/{CUSTOMER_ID}'
- Secret configuration key name template
- __construct() : mixed
- Create instance
- removeSecretForCustomer() : $this
- Remove the stored secret for the provided customer ID
- secretForCustomer() : AuthSecret
- Return the stored secret for the provided customer ID
- storeSecretForCustomer() : $this
- Store the secret for the provided customer ID
- configurationKeyForCustomer() : string
- Return the substituted secret configuration key string for the provided customer ID
Constants
CONFIG_STORAGE_NAMESPACE
Configuration storage namespace
public
mixed
CONFIG_STORAGE_NAMESPACE
= 'modules/gambio/2fa'
SECRET_CONFIG_KEY_TEMPLATE
Secret configuration key name template
public
mixed
SECRET_CONFIG_KEY_TEMPLATE
= 'secrets/{CUSTOMER_ID}'
Methods
__construct()
Create instance
public
__construct() : mixed
Return values
mixed —removeSecretForCustomer()
Remove the stored secret for the provided customer ID
public
removeSecretForCustomer(IdType $customerId) : $this
Parameters
- $customerId : IdType
-
Customer ID
Return values
$this —Same instance
secretForCustomer()
Return the stored secret for the provided customer ID
public
secretForCustomer(IdType $customerId) : AuthSecret
Parameters
- $customerId : IdType
-
Customer ID
Tags
Return values
AuthSecret —Secret
storeSecretForCustomer()
Store the secret for the provided customer ID
public
storeSecretForCustomer(IdType $customerId, AuthSecret $secret) : $this
Parameters
- $customerId : IdType
-
Customer ID
- $secret : AuthSecret
-
Secret
Return values
$this —Same instance
configurationKeyForCustomer()
Return the substituted secret configuration key string for the provided customer ID
protected
configurationKeyForCustomer(IdType $customerId) : string
Parameters
- $customerId : IdType
-
Customer ID
Return values
string —Substituted secret configuration key