Definition at line 9 of file Store.php.
◆ __construct()
sspmod_consent_Store::__construct |
( |
& |
$config | ) |
|
|
protected |
Constructor for the base class.
This constructor should always be called first in any class which implements this class.
- Parameters
-
array | &$config | The configuration for this storage handler. |
Definition at line 18 of file Store.php.
19 {
20 assert('is_array($config)');
21 }
◆ deleteAllConsents()
sspmod_consent_Store::deleteAllConsents |
( |
|
$userId | ) |
|
◆ deleteConsent()
sspmod_consent_Store::deleteConsent |
( |
|
$userId, |
|
|
|
$destinationId |
|
) |
| |
|
abstract |
◆ getConsents()
sspmod_consent_Store::getConsents |
( |
|
$userId | ) |
|
|
abstract |
◆ getStatistics()
sspmod_consent_Store::getStatistics |
( |
| ) |
|
Get statistics for all consent given in the consent store.
- Returns
- mixed Statistics from the consent store
- Exceptions
-
Reimplemented in sspmod_consent_Consent_Store_Database.
Definition at line 92 of file Store.php.
93 {
94 throw new Exception('Not implemented: getStatistics()');
95 }
◆ hasConsent()
sspmod_consent_Store::hasConsent |
( |
|
$userId, |
|
|
|
$destinationId, |
|
|
|
$attributeSet |
|
) |
| |
|
abstract |
Check for consent.
This function checks whether a given user has authorized the release of the attributes identified by $attributeSet from $source to $destination.
- Parameters
-
string | $userId | The hash identifying the user at an IdP. |
string | $destinationId | A string which identifyes the destination. |
string | $attributeSet | A hash which identifies the attributes. |
- Returns
- bool True if the user has given consent earlier, false if not (or on error).
Reimplemented in sspmod_consent_Consent_Store_Cookie, and sspmod_consent_Consent_Store_Database.
◆ parseStoreConfig()
static sspmod_consent_Store::parseStoreConfig |
( |
|
$config | ) |
|
|
static |
Parse consent storage configuration.
This function parses the configuration for a consent storage method. An exception will be thrown if configuration parsing fails.
- Parameters
-
mixed | $config | The configuration. |
- Returns
- sspmod_consent_Store An object which implements the sspmod_consent_Store class.
- Exceptions
-
Exception | if the configuration is invalid. |
Definition at line 122 of file Store.php.
123 {
126 }
127
129 throw new Exception(
'Invalid configuration for consent store option: '.var_export(
$config,
true));
130 }
131
132 if (!array_key_exists(0,
$config)) {
133 throw new Exception('Consent store without name given.');
134 }
135
138 'Consent_Store',
139 'sspmod_consent_Store'
140 );
141
143 return new $className(
$config);
144 }
static resolveClass($id, $type, $subclass=null)
Resolve module class.
References $config, and SimpleSAML\Module\resolveClass().
Referenced by sspmod_consent_Auth_Process_Consent\__construct().
◆ saveConsent()
sspmod_consent_Store::saveConsent |
( |
|
$userId, |
|
|
|
$destinationId, |
|
|
|
$attributeSet |
|
) |
| |
|
abstract |
Save consent.
Called when the user asks for the consent to be saved. If consent information for the given user and destination already exists, it should be overwritten.
- Parameters
-
string | $userId | The hash identifying the user at an IdP. |
string | $destinationId | A string which identifyes the destination. |
string | $attributeSet | A hash which identifies the attributes. |
- Returns
- bool True if consent is succesfully saved otherwise false.
Reimplemented in sspmod_consent_Consent_Store_Cookie, and sspmod_consent_Consent_Store_Database.
The documentation for this class was generated from the following file:
- libs/composer/vendor/simplesamlphp/simplesamlphp/modules/consent/lib/Store.php